DNS Setup for my Domain and connecting Correct Directory /var/www/

Posted August 13, 2015 14.8k views
NginxUbuntuFAQServer OptimizationDigitalOceanDNSConfiguration ManagementIPv6LEMPDeployment

Hi All,

I am new to DO . Getting used to it slowly.
Droplet Specs: IPv6 enabled, Ubuntu 15.0.4 32Bit, LEMP, PhpMyAdmin installed using the tutorials here at DO.

I have a domain at Godaddy. As i learnt that hosting my own mail server will be too hectic and is not recommended. So, i have decided to use the email service of godaddy itself.

Now, if i want to use the godaddy email service, then do i just have to point A records of my domain to DO now or i should even change the DNS.

If yes what should i input in A records at Domain DNS at godaddy and What should i input in A , AAAA records or any other records req at DNS on DO.

That is first part of the quest.

I have created this /var/www/ ( is the example domain for explanation)

now i want to point at godaddy to show content from the above directory.

Will the above asked A Records thing solve this itself, by pointing the A records , will the site load content from the above directory.

If yes, then its fine. If NO, can you help me what should i do for this ?

Please help.


1 comment
  • The first in regards to the DNS. If you plan on having the server host the main website then you will need to point GoDaddy as an A-record to your Digital Ocean Server. So, for example:

    Server has - on you would then need to point your DNS for that domain if you wanted your server to host I think that’s the best way of explaining it.

    If that is the case, then you will need A records however will need to change the primary DNS records for your domain to the Digital Ocean IP. If you’re just starting out with hosting your own server and your site is crucial, I’d recommend just point to a sub-domain for now while you figure things out.

    In terms of pointing the domain to that directory. That can be done in the apache configuration, multiple tutorials online. You will then need to create a site config file to enable everything to run. It’s rather simple in fact to do that, as mentioned multiple tutorials will be online to help you out with that.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
6 answers

What is the purpose of your DO server? From what I’m gathering you want to have content from a web server point to a Godaddy server for other web content and email?

Are you wanting to eventually host web content on the DO server and just use Godaddy for email? If that’s the case, you can just set the A record to the DO server IP address, and CNAME record for “www.” too if desired.

You can continue hosting your email separately on the Godaddy server by leaving the MX record pointing to Godaddy.

I actually do something similar with a couple of domains. The email is hosted by Office 365 for the organization and the web publishing points to another independent server.

  • @mhodges thanks for the reply.

    Yes, i want to host my website at DO, because i want to use nginx as webserver and use the email service of godaddy.

    So, what i need to do is Update A records of my domain at Godaddy like this

    Host : @ , Points to : DO Droplet IP Address, TTL: 600 Sec

    Similarly Update A records at DO DNS

    Host : @ , Points to : DO Droplet IP Address

    I also have enabled IPv6, so do i update AAAA records also at both the places.

    Is the above config right ?

Sounds about right. Basically if you’re MX records are already pointing to a Godaddy server, you should be fine in just changing the IP for the domain itself to point to the DO droplet, and nothing should change for email.

This is also assuming your MX record isn’t pointing to the same location @ is, but is going to one of those “” or whatever Godaddy addresses.

Ok then you’re going to want to have a separate record for that, otherwise it’ll point to your droplet for email. Whatever IP you’re using now for Godaddy should be what the MX record is pointing to.

In theory you want to make a separate A record for, and you can leave the MX information alone.

If doing this doesn’t work, you may want to just call up Godaddy and consult with them on it. Let them know you want to keep your email hosted there and that you just want to have your web publishing point to another IP. They have good support staff that are available 24/7 to answer things like that.

  • Or can i point the Name Servers to DO, and then just update the MX records for mail at godaddy and DO. WIll this also work ?

    Any diff between this method and previous A records method ?

I’m not sure I followed that last part, but I’m thinking you meant to change the domain’s DNS to Digital Ocean’s? That’s fine too, no difference there, just insure the MX record is pointing to a separate A record that is the Godaddy mail server.