How Name Servers & DNS Records Work

Whenever most people I talk to hear Name Servers or DNS records mentioned, they immediately become intimidated and try to avoid any responsibilities associated with them. This is mainly due to the migraines caused by messing with them and not understanding what it is you’re doing. They really aren’t all that complicated. I wrote this post trying to make Name Servers & DNS records less intimidating for people who don’t yet fully understand them. If that’s you, I hope this walk through leads to you never being intimidated by them again!

What are Name Servers?

A Name Server is a server that stores the DNS records of a given domain name.

What are DNS Records?

DNS (Domain Name System) records are settings for how your domain name associates itself in various ways with IP addresses to form connections. They are primarily used to point your website to your web server and email services.

How do I know where my DNS Records are managed?

Whichever Name Servers your domain points to is where your DNS records are managed. Usually, by default your Name Servers are managed at the registrar at which you originally purchased your domain name. You can lookup any domain name using a Whois lookup to find which Name Servers it is currently using. In the following screenshot, you can see that the Name Servers for penguininitiatives.com are dn1.name-services.com,  dn2.name-services.com,  dn3.name-services.com,  dn4.name-services.com, & dn5.name-services.com.

penguininitiatives.com Whois Lookup

Unfortunately, if you don’t know what company or service owns these Name Servers, then its still not clear where your DNS records are managed. Further below, you can see that the Registration Service for penguininitiatives.com is provided by NameCheap.com, so this would be the first place I would check (if I had an account at NameCheap of course).

penguininitiatives.com Raw Registrar Data

Where should I manage my DNS Records?

It is best to keep your DNS records in one place and to avoid changing your Name Servers. This is why it is usually best to manage your DNS records through your domain name registrar. This way if you need to switch web hosts you’ll only need to change a couple of your DNS records, not transfer all of your DNS records and wait for your Name Servers to transfer (which can take 24-48 hours). As long as you buy all of your domain names with the same registrar, you’ll also have all your DNS records conveniently managed in a single place.

What is an A Record?

An A Record is a DNS record that is most commonly used to map a hostname to an IP address. For example, penguininitiatives.com uses our registrar Namecheap to manage DNS records and synthesis for hosting. So we setup two A Records to point our domain at synthesis. The first one tells visitors to www.penguininitiatives.com to load our synthesis web server, because its pointed at the IP address of our synthesis web server. The second one tells visitors to penguininitiatives.com to load our synthesis web server in the same way. The @ in the Hostname represents a blank record for the root domain, meaning if visitors don’t enter www in from of our domain, it will still load our synthesis web server.

penguininitiatives.com A Records

What is a CNAME Record?

A CNAME is simply an alias to another domain or sub-domain. For example, we use the CNAME record cdn for our MaxCDN services. These are useful if you want to link to third-party web services you’re utilizing and want an easy to remember sub-domain to reach them. If you use Google Apps you could setup mail.domain.com to offer an easy to remember URL for your email.

penguininitiatives.com CNAME Records

What is an MX Record?

An MX (mail exchanger) record is a DNS record for associating your domain name with your email provider. We use Google Apps for our email so our MX records are as follows.

penguininitiatives.com MX Records

What is an SPF TXT Record?

Ever had issues with your email being put in someone else’s spam folder? If so, it’s likely you’re missing an SPF TXT record that’s configured properly for your domain name. This record says what server sends emails “officially” from your domain name. Since we use Google Apps our SPF TXT record looks like this: v=spf1 include:_spf.google.com ~all – which means we’re okay with Google’s email servers sending emails using our domain name. If you use your own server for your email yours would look like this instead: v=spf1 ip4:192.168.0.1/16 -all – except it would have your server’s IP address instead of 192.168.0.1.

penguininitiatives.com SPF TXT Record

TXT records can also be used to verify your ownership of a given domain name for services such as Google Webmaster Tools.

What should I do if I need to change my Name Servers?

If you must change your Name Servers, first make sure to record all of your existing DNS records. If you’re managing them at your registrar and you change your Name Servers, they will then all be lost, which can cause a very serious headache that nobody wants to experience. Next make sure to configure all of your DNS records in the same way where you moved your Name Servers to. That way, once the 24-48 hours of switching over occurs everything will be the same as it was before, and not absolute chaos! It is best to avoid changing Name Servers for this reason, if possible.

Still Intimidated by Name Servers & DNS Records?

If so, then I’ve failed you and I would like to apologize for said failure. Please let me know what else I can do to clear up any remaining confusion in the comments!

4 COMMENTS

  1. Hi Andy, thanks for post. i have a quick question. I’am able to call a webservice with IP address , but not with HOSTNAME . Can you please suggest me if you are aware of these cases?
    thanks

  2. I wish I had seen this post before I started messing with the name servers and dns records. I am having some issues with a website that I am working on for someone else. It is a domain that she had purchased but wasn’t hosting anywhere so I changed the name servers to my hosting account. I was trying to set up a cname record so I can set up domain mapping to the site where I built the page for her (Instabuilder in Kalatu Blog). I have tried a lot of different things and have reached a point where I am afraid to make things worse. Any chance you would be willing to have a quick chat and talk it through with me?

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.