# Configuring reverse DNS

> Set up reverse DNS (PTR) for your server's IP address to improve email delivery from your VPS or dedicated server.

Source: https://helpcenter.ruachost.com/vps/guides/configuring-reverse-dns-in-ruachost/

**Reverse DNS (rDNS)** is the process of mapping an IP address back to a domain name. This is the opposite of standard (forward) DNS, which maps a domain name to an IP address. Reverse DNS is most commonly used for **email delivery**, as many mail servers check for valid rDNS records before accepting messages.

## What is Reverse DNS?

- **Forward DNS**: Uses **A records** to map a domain name → IP address.
- **Reverse DNS**: Uses **PTR records** to map an IP address → domain name.

Example:

- Forward lookup: `example.com → 192.0.2.10`
- Reverse lookup: `192.0.2.10 → example.com`

## Why Reverse DNS Matters

- **Email servers**: Many providers reject or flag mail as spam if the sending IP does not have a valid PTR record.
- **Network troubleshooting**: rDNS helps identify hosts by name instead of just IP.
- **Security**: Provides additional verification of server identity.

## Testing Reverse DNS

To check if an IP address has a PTR record:

```bash
dig -x xxx.xxx.xxx.xxx
```

Example:

```bash
dig -x 75.98.175.166
```

Sample output:

```bash
166.175.98.75.in-addr.arpa. 42989 IN PTR mail.example.com.
```

This shows that IP `75.98.175.166` resolves back to `mail.example.com`.

## Configuring Reverse DNS in Ruachost

### Shared Hosting

- Reverse DNS is already configured for the main server IP.
- If you believe it is missing or incorrect, open a **support ticket** with [ruachost.com](https://dashboard.ruachost.com/submitticket.php) and provide:

  - Your domain name
  - Your account’s IP address

### VPS & Dedicated Servers

If you have a **dedicated IP address**:

1. Log in to your [ruachost.com](https://dashboard.ruachost.com) Hosting Panel.
2. Open a **support ticket** under **Support**.
3. Provide the following details:

   - The IP address you want configured
   - The domain name it should resolve to
