Rust guide

How to Connect to a Rust Server With a Domain Name

Rust supports direct connections through a hostname. To make a hostname such as play.example.com resolve to a particular Rust game port, configure an A record and a Rust SRV record. Replace each placeholder below with your server's actual values. 1. Confirm the game port Check the server's server.po…

Rust supports direct connections through a hostname. To make a hostname such as play.example.com resolve to a particular Rust game port, configure an A record and a Rust SRV record.

Replace each placeholder below with your server's actual values.

1. Confirm the game port

Check the server's server.port setting. Rust's default game port is 28015 over UDP, although your server may use a different value.

2. Create the A record

Create an A record mapping the chosen hostname to the server's IPv4 address:

play.example.com.    A    <SERVER_IPV4>

3. Create the SRV record

Create an SRV record using _rust as the service and _udp as the protocol. Its port must match server.port, and its target must be the hostname backed by the A record:

_rust._udp.play.example.com.    SRV    0 0 <SERVER_PORT> play.example.com.

The two zeros represent priority and weight. RFC 2782 recommends a weight of zero when server selection is unnecessary. The target must be a domain name with an address record, not a numeric IP address.

Facepunch's Rust DNS documentation also says not to configure multiple SRV entries for the same server.

4. Connect through the hostname

Open Rust's console with F1 and enter:

connect play.example.com

Facepunch documents the connect command with hostname and IP-address endpoints.

Optional: preserve favorites after address changes

Once hostname connections work, set this Rust server convar:

server.favoritesEndpoint "play.example.com"

Use the A-record hostname without the _rust._udp prefix. Facepunch says this setting lets players who favorite the server continue finding it through the hostname after its IP address or game port changes.

For related server and community material, follow sourced Rust coverage on TOP OF GAMES.

Sources