VPS & Linux
VPS reverse DNS: how PTR records, forward DNS and mail identity fit together
Reverse DNS maps an IP address back to a hostname through PTR records controlled by the address owner or provider. It is most important when a service’s identity is evaluated against its public address, especially mail, logging, abuse handling, and some allowlists.
Choose a stable hostname for the address
Use a hostname you control and intend to keep with the server or service role. Publish forward A or AAAA data so the hostname resolves back to the same address when forward-confirmed reverse DNS is expected.
Avoid assigning a customer website hostname as infrastructure identity if that name may move independently.
Set PTR through the provider that owns the IP
Adding a PTR-looking record to your ordinary DNS zone does not change reverse DNS for a provider-owned address. Use the provider control plane or support process for the reverse zone.
Allow for propagation, then query the relevant in-addr.arpa or ip6.arpa name directly.
Align mail identity deliberately
For SMTP, the PTR, forward record, server hostname, EHLO/HELO, and actual outbound source IP should form a coherent identity. SPF/DKIM/DMARC solve different authorization and alignment questions and still need correct configuration.
Reverse DNS alone does not guarantee inbox placement or reputation.
Recheck after address changes
When a VPS is rebuilt or receives a new public IP, update forward DNS, PTR, service configuration, monitoring, and allowlists together. Remove stale identity from the old address if it returns to a pool.
- Choose a stable infrastructure hostname.
- Set PTR at the IP provider.
- Verify forward and reverse alignment.
- Reconcile identity when addresses change.