How do nameservers and DNS Records work?

Posted by Paul on October 2, 2014

If you've bought a domain and you need to point it to a web host, or you'd like to set up your email with a different mail server then you'll probably be thinking DNS is pretty complicated. Luckily it's not actually that tricky to configure and here's a simplified description of all you need to know to point the domain correctly.

Essentially for our purposes here, think of a domain name (such as www.antropy.co.uk) as being able to control just 2 things:

  1. The website
  2. The email

Each domain needs at least 2 things called nameservers which look something like this:

  • ns1.domain-registrar.com
  • ns2.domain-registrar.com

The nameservers control both the website and the email, so changing them will affect both.

The nameservers themselves have things called DNS Records, and the main types we're concerned about are A records (for the website) and MX records (which control email).

So let's say you want to point your domain and a new webserver but you want to leave email unaffected, you'd need to find out which namservers are being used (this can be seen in the domain control panel) and then update the DNS Records under those nameservers. You'd need to change some A Class records, usually the www and @ records to point to the new IP.

Here's a quick diagram:

  • Nameservers
    ns1.domain-registrar.com
    ns2.domain-registrar.com
    • DNS Records
      (Often once logged in you'll see a "Manage DNS" button.)

      • A Class
        Set these to the IP of the web server.
        • www
        • @
        • CNAME (this is just like an alias)
      • MX Records
        These affect email so should be set up as instructed by your email service.
blog comments powered by Disqus