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

The name is set on the server's public IPv4 and IPv6 together and usually shows up within a minute.

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

  • The PTR belongs to the server, not to the address. If you move a floating IP to another server, the address takes that server's PTR.
  • A reserved address that is not attached to any server has no PTR.
  • The hostname can contain letters, digits, hyphens and dots.
  • To go back to the default, set the server's public name again. It is shown as Public domain on the server page.