What is a PTR record and how to add one?

You can think of the PTR record as an opposite of the A record. While the A record points a domain name to an IP address, the PTR record resolves the IP address to a domain/hostname.

PTR records are used for the reverse DNS (Domain Name System) lookup. Using the IP address you can get the associated domain/hostname. An A record should exist for every PTR record.

The usage of a reverse DNS setup for a mail server is a good solution. Some external mail exchange servers make reverse DNS lookups before accepting messages originating from your mail server.

You can check whether there is a PTR record set for a defined IP address. The syntax of the commands on a Linux OS are:

dig -x IP

or

host IP

For example, you can run the following commands in your Linux terminal:

dig -x 209.85.102.36

and the result would be:

; <<>> DiG 9.5.1-P2.1 <<>> -x 209.85.102.36
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41537
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;36.102.85.209.in-addr.arpa. IN PTR

;; ANSWER SECTION:
36.102.85.209.in-addr.arpa. 7200 IN PTR serv01.siteground.com.

;; AUTHORITY SECTION:
102.85.209.in-addr.arpa. 7200 IN NS ns1.ev1servers.net.
102.85.209.in-addr.arpa. 7200 IN NS ns2.ev1servers.net.

or

host 209.85.102.36

and the result would be:

36.102.85.209.in-addr.arpa domain name pointer serv01.siteground.com.

The corresponding command under the Windows OS command prompt is:

nslookup IP

The reverse DNS lookup for IP version 4 uses a special domain - in-addr.arpa., while the lookup towards IPs version 6 uses ip6.arpa..

Detailed explanation of the reverse DNS lookup can be found in the following article:

http://en.wikipedia.org/wiki/Reverse_DNS_lookup

Currently we provide reverse DNS setup using PTR records on our Cloud and Dedicated servers, where all the server system resources are solely reserved for your account(s).

The rDNS service is provided for free and it can be requested by posting a ticket in the Domain/DNS issues category. There can be only one PTR record per IP address. Multiple PTR records can not be set for one IP.

1 Comment

  1. Reply September 8, 2016 / 14:49 Nick WakelinSiteGround Team

    What is the best naming policy for setting up PTRs where you are on one VPS server with multiple domains and multiple IP addresses? e.g.

    There is
    1 Main VPS IP address = 1.1.1.1

    which runs
    3 live sites = fruit.com, apples.com, pears.com

    and also which has
    3 additional IP addresses for development = 1.1.1.2, 1.1.1.3, 1.1.1.4
    (blueberries.com development site is on 1.1.1.2 but the main site is on IP address 2.2.2.2
    bananas development site is on 1.1.1.3 but the main site is on IP address 3.3.3.3
    blackcurrants development site is on 1.1.1.4 but the main site is on IP address 4.4.4.4)

    In view of the fact that Spam lists such as SpamCannibal don't like generic PTRs

    1) If you name the PTR for the VPS fruit.com, could this have an impact on emails sent from apples.com or pears.com?
    2) Is it best to name the PTR for 1.1.1.2 blueberries.com or would it be better to set it as blueberries.fruit.com (and thus bananas.site.com for 1.1.1.3) or is this seen as generic PTR

* (Required)