# Reverse DNS

Source: https://support.kapsulehost.com/en-us/cloud-servers-reverse-dns

Reverse DNS turns your server's IP address back into a name, such as `mail.example.com`. Mail servers check it before they accept email from you, so set it before your server sends any mail. You set it for each address on the server's **Networking** tab in KPanel.

## Before You Start

Reverse DNS only helps when the name and the address match both ways:

1. Choose the hostname, for example `mail.example.com`.
2. In your domain's DNS, add an A record (and an AAAA record for IPv6) that points that name at your server's IP address.
3. Wait for the record to work. `dig +short mail.example.com` should print your server's IP.

Then set reverse DNS to the same name. A reverse DNS name with no matching DNS record is worse for email than none at all. See [Adding and Connecting Your Domain](https://support.kapsulehost.com/en-us/adding-your-domain) if your domain's DNS is with us.

## Set Reverse DNS

1. Sign in to [KPanel](https://kpanel.kapsulehost.com).
2. In the sidebar, open the section for your server type, for example **Standard Cores**, then click your server.
3. In the server's menu, click **Networking**.
4. Under **IP Addresses**, click **Edit** next to the address.
5. Type the full hostname, for example `mail.example.com`.
6. Click **Save Reverse DNS**. KPanel says "Done."

Each address shows "Reverse DNS:" with its current name, or **Not set**. Set IPv4 and IPv6 separately if your server sends mail over both.

![The Networking tab on a server in KPanel](https://support.kapsulehost.com/help/screenshots/cloud-servers-reverse-dns.304b92a6.webp)

The **Networking** tab is shown when your server supports reverse DNS. **Edit** shows for each address whose reverse DNS can be changed.

## Extra IPv4 Addresses

An extra IPv4 address has its own reverse DNS. Set it on the server's **Networking** tab like any other address, or open **Add-Ons**, then **Extra IPv4**, choose the address and click **Change Reverse DNS**.

## Check It Worked

From any computer, run:

```sh
dig +short -x 203.0.113.10
```

Use your own IP address. It should print your hostname followed by a dot. A change can take a little while to show everywhere.

## Metal Servers Ordered Before the New Catalogue

On older Metal servers, open the server's **Manage Server** page and use the **Reverse DNS (PTR)** card. Click **Edit** on an address, type the hostname and click **Save**. See [Managing a Dedicated Server](https://support.kapsulehost.com/en-us/dedicated-servers-management).

## Troubleshooting

**"Enter a full host name, like mail.example.com."** Type the whole name, including the domain. A single word such as `mail` is not enough.

**"That address does not belong to this server."** Choose an address listed on this server's **Networking** tab.

**Mail is still rejected.** Check the name's A record points at the same IP, and that your domain has SPF, DKIM and DMARC records for the server that sends.

**"Your role can view this server but cannot change it."** Only the Owner and Admin roles can change reverse DNS. Ask the account owner.

## Related Articles

- [Server Firewall](https://support.kapsulehost.com/en-us/cloud-servers-firewall)
- [Managing a Dedicated Server](https://support.kapsulehost.com/en-us/dedicated-servers-management)
- [Connecting to Your Server by SSH](https://support.kapsulehost.com/en-us/cloud-servers-ssh-connect)
- [Server Troubleshooting](https://support.kapsulehost.com/en-us/cloud-servers-troubleshooting)
