Reverse DNS maps an IP address back to a host name, the opposite of normal DNS. Mail servers check it: email from an IP without a matching PTR record is often rejected or marked as spam. If your VPS sends mail – or runs a control panel such as Plesk, DirectAdmin or cPanel – set rDNS before you go live.
Before you start
- Choose a fully qualified host name for the server, for example
server1.example.com. - Create an
Arecord for that host name pointing to the VPS IPv4 address (and anAAAArecord for IPv6) at your DNS provider. Many providers only accept a PTR whose forward record already resolves to the same IP. - Wait a few minutes until the record resolves:
dig +short server1.example.com.
Set rDNS in Virtualizor
- Log in to Virtualizor.
- Open the rDNS screen: depending on version it is under the VPS's Network / IPs section, or in the top menu as rDNS (or Reverse DNS).
- Find the IP address in the list, or click Add Record and select it.
- Enter the host name, for example
server1.example.com(some versions require a trailing dot:server1.example.com.). - Click Save or Add.
Repeat for each IPv4 address and, if you send mail over IPv6, for the IPv6 address. Changes usually take effect within minutes, but caches can delay them up to a few hours.
If the rDNS option is missing
Some providers manage reverse DNS centrally and do not enable the self-service screen. In that case, open a ticket with the IP address and the desired host name. MdmHost customers can use a support ticket.
Match the server's own hostname
For best results the PTR, the forward A record and the server's hostname should all match. Set the hostname inside the VPS:
hostnamectl set-hostname server1.example.comYou can also change it in Virtualizor; see change hostname in Virtualizor. Mail servers such as Postfix or Exim use it in their greeting (HELO), which receivers compare to the PTR.
Verify
- From any computer:
dig -x 203.0.113.10 +shortshould returnserver1.example.com. - Forward check:
dig +short server1.example.comshould return the same IP. - Send a test email to Gmail and check the headers for a passing result.
Troubleshooting
- Error "forward DNS does not match": the
Arecord does not exist yet or points elsewhere. - PTR shows the provider's default name: the change has not propagated, or it was saved for a different IP.
- Mail still rejected: rDNS is only one check. Also configure SPF, DKIM and DMARC; for Plesk see SPF, DKIM and DMARC in Plesk.
- Several domains on one IP: an IP can have only one PTR. Use the server's hostname, not a customer domain.
