# Set reverse DNS (PTR)

> Reverse DNS (a PTR record) maps a server's IP address back to a hostname — useful for mail servers and clean logs.

Source: https://infranest.io/docs/reverse-dns
Last updated: 2026-09-06

---

Reverse DNS (a PTR record) points your server's IP address back to a hostname — it's commonly needed for mail servers and helps keep logs clean. This guide is for anyone who needs to set or update this on a server managed in InfraNest.

## Overview
- A PTR record maps an IP address back to a hostname, the reverse of a normal DNS lookup.
- Mail servers often require this to be set correctly, or outgoing mail may be flagged as spam.
- You can view and edit this directly from your server, without needing a separate DNS setup.

## Set reverse DNS
1. Open the server and go to its **Networking** tab (or open the **Primary IPs** page).
2. Set the **PTR record** value for the address:
   - For a single IP, it's a one-field edit.
   - For an IPv6 block, you'll see the existing records with an option to add a record that pre-fills the next free address.
   - For providers that assign several separate addresses, each one is editable on its own.

<!-- docs-screenshots:start -->

![Set reverse DNS (PTR)](/media/cb386e51-0b0e-42b3-9af1-8ec9bbee990c)

<!-- docs-screenshots:end -->

3. Select **Save changes**. InfraNest checks that the address is within the server's assigned range and applies the change at the provider.

> [!NOTE]
Changes to reverse DNS are applied at the provider level and may take a little time to propagate.

## Troubleshooting
- If **Save failed** appears, double check the address you entered is within the range assigned to your server — InfraNest will reject addresses outside that range.
- If the record doesn't seem to take effect, allow some time for the change to propagate before trying again.
