What Is a PTR Record
Learn how PTR records enable reverse DNS lookups, mapping IP addresses to domain names. Includes examples for the DNScale dashboard and API.
A PTR (Pointer) record provides reverse DNS (rDNS) lookup, mapping an IP address back to a domain name. While A/AAAA records convert domain names to IP addresses, PTR records do the opposite—enabling you to find which domain is associated with a given IP.
How PTR Records Work
PTR records use special reverse lookup zones:
IPv4: IP addresses are reversed and placed under in-addr.arpa
1.2.0.192.in-addr.arpa. 3600 PTR mail.example.com.This maps 192.0.2.1 → mail.example.com
IPv6: Each nibble is reversed under ip6.arpa
4.3.3.7.0.7.3.e.2.a.8.0.0.0.0.0.0.0.0.0.3.a.5.8.8.b.d.0.1.0.0.2.ip6.arpa. 3600 PTR mail.example.com.Why PTR Records Matter
Email Deliverability
Mail servers check PTR records to verify sender legitimacy:
- Many mail servers reject email from IPs without valid PTR records
- The PTR should match the server's HELO/EHLO hostname
- Mismatched or missing PTR records often result in spam filtering
Security and Logging
- Firewall logs can show hostnames instead of raw IPs
- Security tools use rDNS for threat analysis
- Network troubleshooting benefits from readable hostnames
Service Verification
- SSH connections can display the connecting hostname
- Web servers can log visitor hostnames
- Network monitoring tools provide clearer reports
Common Use Cases
Mail Server Configuration
; Forward record
mail.example.com. 3600 A 192.0.2.25
; Reverse record (in reverse zone)
25.2.0.192.in-addr.arpa. 3600 PTR mail.example.com.Web Server
; Forward record
www.example.com. 3600 A 192.0.2.80
; Reverse record
80.2.0.192.in-addr.arpa. 3600 PTR www.example.com.Multiple Services on One IP
When one IP hosts multiple services, the PTR typically points to the primary hostname or a generic server name:
25.2.0.192.in-addr.arpa. 3600 PTR server1.example.com.Record Format
| Field | Description | Example |
|---|---|---|
| Name | Reversed IP in .arpa zone | 1.2.0.192.in-addr.arpa |
| Type | Record type | PTR |
| Content | Target hostname (FQDN) | mail.example.com. |
| TTL | Time to live (seconds) | 3600 |
Adding a PTR Record
Important Note
PTR records are typically managed by whoever controls the IP address block:
- Cloud providers (AWS, GCP, Azure) - Configure via their console
- Hosting providers - Use their control panel or contact support
- ISPs - Contact your ISP for PTR record changes
- Own IP space - Manage in your reverse DNS zone
If DNScale manages your reverse zone, you can add PTR records directly.
Using the Dashboard
- Navigate to your reverse zone (e.g.,
2.0.192.in-addr.arpa) - Click Add Record
- Configure the record:
- Name: Enter the last octet(s) of the IP (e.g.,
1for 192.0.2.1) - Type: Select
PTR - Value: Enter the fully qualified domain name
- TTL: Set the cache duration (default: 3600)
- Name: Enter the last octet(s) of the IP (e.g.,
- Click Create Record
Using the API
Create a PTR record:
curl -X POST "https://api.dnscale.eu/v1/zones/{reverse_zone_id}/records" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "1",
"type": "PTR",
"content": "mail.example.com",
"ttl": 3600
}'Note: The zone must be a reverse zone (e.g., 2.0.192.in-addr.arpa).
API Response:
{
"status": "success",
"data": {
"message": "Record created successfully",
"record": {
"id": "encoded-record-id",
"name": "1.2.0.192.in-addr.arpa.",
"type": "PTR",
"content": "mail.example.com.",
"ttl": 3600,
"disabled": false
}
}
}IP Address to PTR Name Conversion
IPv4
Reverse the octets and append .in-addr.arpa:
192.0.2.1 → 1.2.0.192.in-addr.arpaIPv6
Expand fully, reverse each nibble, add dots, append .ip6.arpa:
2001:db8::1
= 2001:0db8:0000:0000:0000:0000:0000:0001
→ 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpaBest Practices
-
Match forward and reverse - PTR should resolve to a hostname that resolves back to the same IP (forward-confirmed reverse DNS)
-
Use FQDNs - Always use fully qualified domain names with trailing dot
-
One PTR per IP - Unlike A records, each IP should have only one PTR record
-
Mail server PTR is critical - Email deliverability depends heavily on proper PTR configuration
-
PTR must match HELO - For mail servers, ensure PTR matches the SMTP HELO/EHLO hostname
Verifying Forward-Confirmed Reverse DNS (FCrDNS)
For email deliverability, verify your setup:
# Step 1: Check PTR record
dig -x 192.0.2.1
# Step 2: Verify the result resolves back
dig A mail.example.com
# Both should match the same IPTesting PTR Records
# Query PTR for IPv4
dig -x 192.0.2.1
# Query PTR for IPv6
dig -x 2001:db8::1
# Using specific nameserver
dig -x 192.0.2.1 @ns1.dnscale.eu
# Short output
dig -x 192.0.2.1 +shortCommon Issues
| Issue | Cause | Solution |
|---|---|---|
| Email rejected | Missing PTR | Add PTR record via IP provider |
| PTR mismatch | PTR doesn't match A record | Ensure forward/reverse consistency |
| Cannot add PTR | Don't control reverse zone | Contact IP address provider |
| Slow lookups | DNS timeout | Verify PTR nameservers are responsive |
Related Record Types
- A - Forward lookup (domain → IPv4)
- AAAA - Forward lookup (domain → IPv6)
- MX - Mail server configuration
Conclusion
PTR records are essential for email deliverability and network operations. While they're often managed by IP address providers rather than DNS hosting providers, understanding PTR records helps you ensure proper configuration and troubleshoot delivery issues. When you control your IP space, DNScale can manage your reverse DNS zones alongside your forward zones.