Setting up a GeoDNS server, are custom nameservers required/adviced?

So i’m looking to setup a DNS server that picks the closest Varnish caching server available based on what country the request is coming from.

This tutorial looks very good however i’m curious if running custom nameservers is required and if not, adviced. Can I also use Namecheaps nameservers and point domains to my GeoDNS server from Namecheaps admin panel?

I’m also curious if I would have to setup records for every country possible in order to get optimal geo distrubtion going. For instance when I have 1 server in Germany and 1 in The Netherlands and someone has a geo location of Poland (e.g, do I need to manually configure to go to the German server IP. If so, I would love some tips on how to deal with the matter.

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.


Instead of setting up a complex DNS configuration, you may want to look in to using NGINX to simply proxy to the closest Varnish server using GeoIP. The setup is less detailed and easier to replicate.

How To Use Nginx as a Global Traffic Director on Debian or Ubuntu

You’ll still need to create individual servers for each location you wish to handle, though if you look at the guide, there’s also a default server, which means for instances where there’s not a target defined, the default server will be used.