PTR record for multiple domains on the same droplet

May 9, 2015 6.9k views
Email DNS DigitalOcean Ubuntu

I have 2 domains hosted on the same droplet (and the same IP)
How do I set PTR records for both, so the mails going from both domains will not be rejected?

5 Answers

Thank you for your answer, but it would be easier to me to understand it with a sample.
Currently this is what I have:
the droplet name is (not or
it host 2 domains:
with MX:
with MX:

Do you suggest to change domain2 MX to
In this case emails from will not be treated as spam?

Your droplet has a dedicated IP. For people to remember this droplet's address easier, you are asked to enter a 'hostname'.

What is hostname? This is the part where most people get confused. They assume by hosting a website '' in this droplet, you should enter '' as hostname. Well, there is nothing wrong about it, but it become an issue when you are hosting more than one website in single droplet (who don't?)

By practise:

Droplet #1:
Hosting website '' and ''

Droplet #2:
Hosting website '' and ''

Your PTR are assigned to both and

  • So if the droplet is for IP1 the PTR for IP1 will be, handled automatically by DO (i.e. I don't need to edit anything in the DNS settings of the droplet), right?
    And MX should be what?

  • Yes, PTR will be handled by DO. It is a label of IP-to-hostname. Not something of your DNS settings, etc

    I assume you wish to enable email service for and First, assuming you have the email services installed in droplet ''. You have to create MX records for both and
    MX record:, priority is 10
    MX record:, priority is 10

    Notes: email service is not something you can do with one droplet. It is a rather complicated services which require many other services to work - Spam, virus, backup, archiving, IMAP, webmail, email control panel. You can host email with third party email hosting company and point the MX there. Or, you can also try if you just need a SMTP server to deliver some email for your project.

  • and should both be pointing to the IP address of

This isn't how you do it, for one a ptr can only be a single domain
Secondly, you should point your second domains mx record to the same A record as domain1's mx. That way they will both work with the one ptr.

  • the RFC actually says nothing about a PTR being a single domain, that's incorrect. just because even the majority of mailers behave unpredictably doesn't override the RFC

the RFC doesn't specify that there can only be one PTR per IP; as some one else who would like this control, i'm responding. it'd both save me addressing and time; presently this is a configuration i employ frequently for some things which are mostly irrelevant. what is relevant is it'd make things more useful, as for standards there is nothing in violation of the standard to setting more than one. with that in mind my question isn't whether it's in tune with the RFC but whether it's a configuration DO is willing to permit, that, or classless reverse delegation would be nice. although classless reverse delegation doesn't really elate me, i'd prefer the ability to directly manipulate the record on the IP for several reasons, not to mention, I frequently am in the habit of assigning an A record in addition to the PTR...that is not usual, but also, should any doubt that is acceptable, do try and start named without having any reverse delegations possessing an A record; bind 9 won't even load the zone.

Have another answer? Share your knowledge.