How to setup DNS redundancy on your website

Most websites have their domain name DNS connected with whoever they bought the domain from. So for instance if you use GoDaddy for your domain name, they also host the DNS. Just to clarify, DNS is what maps your domain name (approbo.com) to an IP address that your computer/web browser uses to find the server your connecting to. There are DNS servers that your local computer connects with to resolve the websites you go to. Typically this is your ISP’s (your local internet connection provider) server, unless you use opendns.org’s servers (which are free and great).

The main issue with using your registrars DNS server is redundancy. They typically don’t do a great job of world-wide server deployments and they don’t allow you to make complex changes very easily. External DNS is also much more flexible in how you manage traffic once your site grows to a large size.

A second issue is if you are moving your website from one IP to another (changing hosting providers for instance), you want your TTL (time to live) to be very low so the IP is removed from the DNS cache quickly. This let’s you switch with minimal downtime to your users. This is also good to have in case your hosting provider has a catastrophic failure (AWS does go down) and you can switch hosting providers pretty quickly.

So how do you use an external DNS provider?

The first step is to find a company you can trust, we use Dyn.com which has been around for awhile. They offer managed DNS which is what you are looking for (the service is called “DYN Standard DNS”). Providers call this service by different names, but it’s DNS hosting at the end of the day.

Create an account, and setup the paid plan. At the time of this writing it’s $60/year.

Now setup the domain you would like hosted. This will not affect anything until you tell your domain registrar (GoDaddy or someone else) which DNS to use for your domain name. The IP Address for your A record (which is the main record that connects a domain name to an IP Address) comes from your web host that actually serves your website. This is often the same as your domain registrar (GoDaddy), but if you are using a custom app this can be Heroku, AWS, Digital Ocean, etc. You can also just ping www.yourdomainname.com and see what the IP Address comes back as.

Don’t forget, if you are using things like gmail or office365, there are things such as MX records (mail exchange) that must be copied as well. There are also SFP records, which are authentication records for mail sending (if your emails are being sent to SPAM often, this might be missing). There are most likely CNAME’s which are aliases to your domain name (app.approbo.com, support.approbo.com, etc), so copy those over as well.

Once you have the DNS provider setup, then you need to update your domain name registrar with the DNS hosting information. If you are using dyn.com, they will tell you which DNS servers to use. They will look like “nsXXXX.dns.dyn.com”, where XXXX is a 4 digit number. They should provide four of these hostnames for you to use. Login to your domain registrar and find the DNS configuration for your domain name. Click “external DNS” and paste in the four hostnames Dyn.com provided.

Once that is setup, it will take some time for the DNS servers to update, but it should be complete within a day. You can check DYN.com to make sure the configuration has synced (they will show it as managed or not) and your now setup with world-wide DNS redundancy.

This should all happen with no downtime since your not changing the IP address people use to connect to your site.

If your site expects a great deal of traffic, you can also pair this with hosting in different countries, and setup specialized DNS to send people to different data centers based on their geographic location. Exciting stuff!

Need help doing this? Give us a shout, we can help.