How do I make my custom name servers work with my VPS?

Posted February 25, 2016 3.6k views
DebianDNSDigitalOcean Articles

Hello! On my domain name registrar, I already created and The IP Address of my droplet is Both and are pointing to this IP Address.

What I want to do is to use my custom name servers with my VPS at DigitalOcean. How can I do this? I read various tutorials on A and CNAME records, but this has left me very confused. I’d appreciate the help :)

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
1 answer

Hi, first I would make a floating ip and assign it to your VPS.
Then I would in the DO DNS set A-name to point to the floating IP.

Inside the webserver you also need to set up your domain.
If you want www.domain.tld to work, you have to add a subdomain to both the DNS on DO with A-name pointing to the same floating ip and the same subdomain has to be pointed from your webserver.

You can think of domains like street adress, multiple people can reside on the same adress.
The DNS is where people ask: “hey, where does yourdomain.tld live?” and then the DNS sees: ah, for your service you have to go to ip <.....>. Then the serverver sees what’s requested and it maps the domain to the correct website.

Do you have nginx, apache, openlitespeed?