How do I setup a PTR record with my exisiting domain name?

February 5, 2015 13.2k views

I have a created a VPS server (or i think you refer to them as droplets?) and I want to setup a PTR record so that the IP address forwards to the domain name. I have registered the domain name with godaddy. How exactly do I set this up? At godaddy, I have the nameservers set to ns1,ns2 and ns3.digitalocean.com. Im familiar with A records and CNAME and MX but this PTR is new to me. Thanks

  • The PTR record will update automatically after you change your droplets hostname. It is something that you don't have direct control over (like the DNS manager in the DigitalOcean dashboard) but something that is handled automatically by DO in relationship with your droplets name.

  • I had the issue of emails sent from the droplet to gmail accounts vanishing into a black hole, and the PTR record turned out to be the cause. You have to "rename" your droplet via the DigitalOcean dashboard. Changing the actual hostname in the OS of the droplet wont do anything.

    So, for example, if you want to link the PTR to the domain "yourdomain.com" and your droplets hostname is "server" then rename your droplet to "server.yourdomain.com" in the DigitalOceal dashboard.

    You may also want to add a "server" A or CNAME record in the DNS Zone of "yourdomain.com", so you don't have to use/remember the IP when connecting via ssh (expl. ssh user@server.yourdomain.com).

  • @johano please suggest where is DO dashboard? I want to check my droplet hostname but I don't see such settings

4 Answers

PTR records are the reverse lookups, they're set in the control panel by setting the Droplet Name. If the droplet name is a fully qualified domain name (domain.com) then the PTR will be set to it.

Hi there,
I'm having the same question.
How can I see if the droplet is a "fully qualified domain name"?
You mean, the droplet name has to be something like "mydomain.com"?
What if I would like to have several domain pointing to the same droplet?

You can point as many domain names as you want to your VPS. All you have to do is set an A record to the IP address of the vps. A FQDN is something like vps.example.com or just example.com. Now, if you want to set a PTR record, which points an IP address to a domain, which is the exact opposite of an A record, you just put it in the hostname field under the settings control panel. But, it will only work properly if you also have an A record with it. You can only have 1 PTR record per IP address.
So a PTR record works like this - -> vps.domain.com and an A record works like this - vps.domain.com ->, which is why its also called reverse DNS.

Have another answer? Share your knowledge.