Different server for emails and website

August 28, 2014 1.4k views

Hello. I built a website for my client and I want it to host it in digitalocean. My client doesn't want to change his email platform and he wants to keep it in the previous server. So I thought to add an A RECORD on the previous server to point to DigitalOcean's one.
Ok this is easy. But I don't know that to do in the domain's nameservers. I'll keep the present nameservers or I should add DigitalOcean's? And also what should I do in DNS setting of the droplet?

Thank you

  • I have the same issue...
    I've managed to point the www already. The only thing I'm having problems is pointing the domain when they don't type in the www.

    www.example.com - points to the ip just fine by adding the A RECORD.
    example.com - Still points to the old location.

  • @eddiecue: Can you post the actual domain name and the correct IP address?

  • Hi,

    The correct way to retain the email on the old server is as below:

    • In your D.O server, put the client's domain name (without the www) in the /etc/remotedomains file. This tells the D.O server that the domain's email is hosted remotely
    • In the client's DNS records, make sure you have the following entries: An A record for mail.clientdomain.com that points to the email server's IP address (not D.O server's IP address); An MX record that goes like MX 0 clientdomain.com (assuming the client has only one MX record for his old email platform)

    That's it.

    For making example.com point to the D.O IP, you can add an A record or a CNAME record. Both will work.

2 Answers

It will probably be easiest for you to keep your current nameservers and just add the A record for the domain (and www if you use that) ..point those to your droplet IP.

No need to do anything with the digital ocean DNS since you will not be using that.

  • So I'll deploy the droplet, I'll add the A Record of the domain to the droplet's IP, and finally i'll add the domain.conf in the apache. That's it?

In theory, yes.
Once you add that A-record, it might take a little time for it to start working across the internets.

NOTE* If you create an A record for a sub-domain, just type in the part of the sub-domain (like www or forum, rather than typing in forum.yourdomain.com )

A lot of people seem to make that mistake and wonder why it is not working

Have another answer? Share your knowledge.