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

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 :)

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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?