How Do I Use DigitalOcean As My Nameserver?

Posted July 18, 2015 4.4k views

I didn’t really know how to title the question because it’s really more than what I titled this post, but that’s what explanations are for I guess. Here’s what I would like to do.

Someone very adept as fiddling with DNS records would be ideal for answering this question.

Here’s my topology so-to-speak.

I have a domain that I would like to split across two hosts. Here’s SPECIFICALLY what I mean.

I want to host at one host and at another (DigitalOcean).

Now, as I understand it (it’s been years since I have messed with DNS records), I could achieve this by doing the following …

Setup my registrar’s DNS records like so … => IP of host1 => IP of host2 (DigitalOcean droplet)

In order to pull this off, I would have to tell the registrar that I want to use their nameserver. That would be step one. Then, configure the DNS records as shown above.

I’m just really not sure how I would do this.

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
4 answers

I didn’t really understand your question, I think, but this should be how to set the DNS as you asked:

Type Hostname IP
NS -
NS -
NS -
A @ {ip:host1}
A sub {ip:host2}

Which registrar did you use? I can help you with Namecheap to set custom nameservers.

I think I have solved[Example link](http://) my issue. We shall see. Here’s my current DNS configuration. I am trying to keep the nameserver configuration as close to the registrar as possible. It would be a hassle if I closed my account here or somewhere else (another host) and had to change where my custom DNS settings were. So, my registrar now holds this configuration.

Host #1 = The host that will handle the pretty website and all that javascript / css / php we love to mess around with.

Host #2 = The serious business host (DigitalOcean) where I can create a development test server.

Type Host IP
A @ Host #1’s IP
A * Host #1’s IP
A dev Host #2’s IP

Thanks to this amazing tool, I have this working exactly correctly.

The @ entry says when the domain is matched exactly, go to host #1 and pull the resource (site). The * says, whenever someone types in any subdomain OTHER than the exception (dev), still go to the host #1 and pull that resource (whatever it may be). The “dev” bit says, when the input matches exactly, go to host #2 (DigitalOcean). Perfect!

Does anyone see anything wrong with this? Will this configuration cause any DNS issues?

Ok, so I have this working now. It’s working flawlessly as follows. => Host 1 => Host 2

Now the final question remains …

When I setup a droplet, should I set the hostname (first input box) to “dev” or “” (the fully qualified domain name)? My guess would be the entire domain name, but I am unsure.

When the user agent request reaches the digital ocean servers, it expects to see the tnire thing I believe. Am I correct?

I just want to be clear — when you create a droplet, the “hostname” is NOT a “nickname” or something, it’s actually the name used to configure the server - as in the hostname of the machine (if it were a bare metal box).

Yes, the Droplet’s name should be a FQDN, so the entire (just to enable the PRT record creation).

Have a nice day, Alfio.