Sign up

Set reverse DNS (PTR) for a server

Every server with a public address gets a PTR record automatically. It points to the server's public name, vm-xxxxxxxxxxxxxxxx.vm.serverscamp.com, and that name resolves back to the same address, so forward and reverse DNS match from the first boot. You can replace it with your own hostname, which is what a mail server usually needs.

Change the PTR

  1. Open Servers and click your server
  2. In Network Settings, find Reverse DNS (PTR) and click the pencil next to it
  3. Enter your hostname, for example mail.example.com, and click Save

From the server page the name is set on its public IPv4 and IPv6 together. To give each address its own name, or to name an address that is reserved and not attached, use Floating IPs: every address has its reverse DNS name with a pencil next to it. A change usually shows up within a minute.

Servers without a public address reach the internet through their router, so outgoing mail leaves from the router's address. That address has its own PTR, router-xxxxxxxxxxxx.static.serverscamp.com by default. Change it on the Routers page with the pencil in the Reverse DNS column.

Point your hostname back to the server

Mail servers check that the PTR name resolves back to the same address. Add an A record for your hostname at your DNS provider, and an AAAA record if you use IPv6, both pointing to the server's public addresses.

mail.example.com.   A      203.0.113.10
mail.example.com.   AAAA   2001:db8::10

Check it

host 203.0.113.10
host mail.example.com

The first command should print your hostname, the second the server's address. On Windows, nslookup 203.0.113.10 does the same.

Good to know

  • A name you set belongs to the address. It moves with a floating IP to another server and stays while the address is reserved.
  • When you release an address back to us, its name is removed.
  • The hostname can contain letters, digits, hyphens and dots.
  • To go back to the default name, use Reset to default in the Floating IPs editor.