I’ve touched on this a couple of times, but I’ll go into a little more detail here. Assuming you’ve got a VPS (or dedicated server), should you host your own DNS servers, use DNS servers provided by your hosting company, use specific DNS services, or use the DNS provided by your domain name provider?
There are many factors to consider – maintenance, uptime & reliability, costs, speed, ease-of-use, and more.
We’ll start with a few pros and cons of each, looking at it from a typical VPS point of view:
Self Hosted
Even for those who aren’t savvy enough to manually configure BIND, self-hosted is often an option that’s made readily available. WHM / CPanel for instance will happily set up BIND and DNS servers for you during install, and will let you set up or modify host records with relative ease. When you create a website, entries are automatically generated. If you need to set up or modify special host records for some reason, it can all be done from within a control panel.
Pros:
- EASY movement. Since the name servers are part of your VPS, if you ever have to move to another host, it’s a fairly simply backup/restore procedure. On the whole (besides the backup/restore itself) you’re looking at changing IP’s in a couple places for dns1.mainserver.com and dns2.mainserver.com. Even if you have a few hundred websites on that VPS, they’re generally already pointing to dns1.mainserver.com and dns2.mainserver.com.
- Potential for huge uptime. Big DNS-providing companies are periodically targets for DDOS attacks. Namecheap’s DNS servers went down at one point in 2008 due to a DDOS attack. EditDNS was hit with a DDOS recently, although they managed to keep their DNS servers from all being down at the same time. DYN was hit in 2016, Cloudflare had an outage in 2020… you see where this is going. If the DNS pointing to your site goes down, people generally can’t access your site – it’s that simple. Hosting yourself keeps you from being at the mercy of other companies.
- Potential for quicker DNS requests. The first thing that happens when someone types in www.yourwebsite.com is a DNS lookup. Like everything else, if the DNS servers are overloaded, it will take some time before a visitor gets the response. If you host your own DNS and are able to keep the server from being overloaded, you won’t have that issue. Location also matters, and if your VPS/DNS are located near the bulk of your visitors, that’ll help out too.
Cons:
- Potential for more downtime. Yes, contradictory to what I just said above, you could very well have *more* downtime. The problem is, many people who have 1 VPS run the DNS from that 1 VPS. Any time the VPS goes down, even for a restart, the DNS servers running from it aren’t available. This isn’t good – particularly because DNS results are cached. Caching itself is a good thing, but if someone tries to visit your site and the failed DNS result is cached, they may not be able to visit your sites again until that cache expires, even if your site is back up and running before then.
- Extra load on your sever. It’s another service you have to run on your VPS, and it has to serve requests. Granted, it’s not likely to contribute a lot of load or use a lot of memory compared to other things (webserver, SQL, etc), but it’ll be using some resources.
- It’s an avenue for you to be attacked. It’s one more thing you have to keep up-to-date to keep vulnerabilities at bay, and if someone decides to target your DNS server in a DDOS attack, your little VPS probably won’t fare as well as a larger host.
- You need an IP address for each DNS server. If your host doesn’t provide a few for free, you’ll generally have to pay extra.
- To maintain anywhere near 100% uptime, you often have to set up DNS servers on multiple physical hosts in various locations. Things like WHM / CPanel’s DNS ONLY make this a little easier to set-and-forget on the management end of things, but you’re looking at added cost for additional VPS’s or servers to host these on.
DNS Servers through your domain provider
Often, large domain providers will have their own DNS servers that you can use (Namecheap for example). As long as your provider allows you to set up all the host records you need, it’s not necessarily a bad thing.
Pros:
- You don’t have to worry about maintaining/updating the DNS servers. Your provider does.
- No DNS overhead. Less of your own resources being used.
- The provider worries about DDOS attacks – you don’t have to.
- Often free for all the domains you host through them.
Cons:
- You have to set up EACH domain to point to your server’s IP. If you have 100 websites, they’ve all got to be set up through the domain provider’s control panel to point to your VPS’s IP address.
- If your IP address ever changes (for example if you move your VPS to another host), every website you host needs to change the IP address.
- Any host records have to be set up with the domain provider.
- Because of the above 3 issues, you can/should only use this for a VPS that hosts websites that YOU own. If you have customers that you host, this is not going to be an option.
- Because this is a “free” option, the domain provider may not be terribly concerned about making sure their DNS servers are quick, responsive, and underloaded. Your mileage may vary.
DNS Servers through your VPS host
Many VPS hosts also allow you to use their own DNS servers. The pros and cons are very similar to the above case. If you have customers, it’s still not a great option – they’d have an easier time simply pointing domains to your VPS host’s nameservers, but you’d have the work of manually setting up the IP’s in your VPS host’s control panel. You’d also be responsible for setting up any/all extra host entries manually. Basically, it becomes less work for your customers, and more work for you.
Use a dedicated DNS service
There are quite a few out there. Most of the time they cost money if you want them to be fully-featured (some have free options with limitations in place). If you look around, you’ll find some that serve the DNS requests from multiple locations around the world which can help for a speedy experience for viewers. They’ll usually provide a large number of DNS servers also which really decreases the chance of downtime. There’s the potential for the fastest, most reliable DNS you’ll find (outside of an expensive self-hosting solution).
So what’s the best option?
If you’re hosting customers, you’ll probably want your own DNS servers, spread across multiple machines, with a control panel that integrates those servers well. Let’s face it, dns1.yourwebsitename.com looks more professional than other options, and it makes it much easier for the customer to simply point their domains there. However, some DNS providers offer “vanity” DNS names, which allow you to use their DNS servers but keep a dns1.yourwebsitename.com style, so that may remain an option.
If you’re hosting your own small or medium-sized sites, you’ll probably want to go with DNS provided by either your domain provider or your VPS host. This will take a little work off your VPS, and you won’t have to worry about patching any DNS exploits. Chance are, your VPS will be down more often than their DNS servers (unless you never restart and nobody else manages to crash the VPS), although you may want to do a little searching beforehand on your specific VPS host or domain provider to see if they’ve had downtime on their DNS in the past and how long it lasted. The big plus here is that it’s typically free to use those DNS servers.
If you’re hosting your own large sites, you’ll probably want to go with either a few of your own dedicated DNS servers hosted in various locations, or a specific paid DNS service. A paid service often costs less than buying servers simply for the sake of DNS hosting, but weigh the pros and cons and decide on your own.
———————————————
In the event that you’re not using your own DNS servers, a couple areas you may want to look at (regardless of who you choose as your host) are:
- Reliability of that particular host.
- Distance from the host’s DNS servers to the location your traffic comes from.
- How responsive the DNS servers are (do a few tests at different times during the day to see how long it takes for a DNS request to resolve.
- How many DNS servers they offer (redundancy).
- Whether they’re able to serve requests from multiple servers in various geographical locations (Anycast).
1 Comment | Leave a Comment