Managing DNS records

            

This guide is for advanced users

Your email or website can stop working if you get these settings wrong, please be careful.

   

Our system allows you to add A, CNAME and MX records to your domain, here we explain about each type and how to use them.

Address, or "A" records, map the name of a machine to its numeric IP address. This record says "for this hostname go to this IP address". To "resolve" a hostname means to find its IP address. This is the record that a name server would send another name server to answer a resolution query. The image below shows how an A record should look:

Sample A Record

Using domainname.co.uk as an example, the above address record will point all requests for home.domainname.co.uk to the IP address 192.168.6.9. Even if domainname.co.uk is actually situated on a different IP. This would allow someone to share their domain between a number of machines, each using a different hostname.

Things to be aware of

  • Placing another hostname in the Right Field. A records will only work when pointed to an IP address.

CNAME (Canonical Name Records) records allow a machine to be known by more than one hostname. There must always be an A record for the machine before aliases can be added. The host name of a machine that is stated in an A record is called the canonical, or official name of the machine. Other records should point to the canonical name. Here is an example of a CNAME:

Sample CNAME record

You can see the similarities to the "A" record. Records always read from left to right, with the subject to be queried about on the left and the answer to the query on the right. A machine can have an unlimited number of CNAME aliases. A new record must be entered for each alias though.

This record would allow the domain 'house.domainname.co.uk to resolve to home.domainname.co.uk, which in turn points to the nominated IP address. Note that this means that visitors pointing their web browser to house.domainname.co.uk will not see the webspace on the account but could view webspace that might be served from the computer with the nominated IP address 192.168.6.9

A common use of this facility is to allow customers to directly host their own webpages from their own servers rather than the space set aside for them on the our servers.

Things to be aware of

  • The canonical name (nominated on the right) must be fully qualified (FQDN)
  • If the canonical name doesn't have the full stop at the end, the DNS will add the domain name on again. For example "house.domainname.co.uk" would become "house.domainname.co.uk.domainname.co.uk".

MX records specify a mail exchanger for a domain name: a host that will either deliver or forward mail for the domain name (through a firewall, for example). Forwarding email, not in the sense of sending a received email to another recipient but actually routing the email to another mailserver which will either deliver the email or continue routing it through the system.

In order to prevent mail routing loops, the MX record has an extra parameter, besides the domain name of the mail exchanger: a preference value. The preference value is an unsigned 16-bit number (between 0 and 65535) that indicates the mail exchanger's priority. For example, the MX record:

Sample MX records

An MX record priority of 3 means that it will be chosen as the destination for mail traffic above any other MX record with a Priority (Pri) value of 4 or higher. It's counterintuitive, but you can think of it as a music chart with 1 being the highest priority and higher numbers becoming increasingly marginal.

The great benefit of MX records is that they provide alternate routes for email traffic which increases the fault tolerance of the mail system. If your main mailserver is down or already jammed with traffic then instead of the mail being returned as a failure it can be sent to a 'backup' mailservice.

Things to be aware of

  • The right hand side of the record should not contain an IP address
  • The right hand side of the record should not contain a CNAME. Furthermore a host should not be named in both a CNAME and MX record.
  • A lack of MX records or records that declare priority when they probably shouldn't (because the host being pointed to isn't accessible.
  • The most common problem is a lack of full qualification - look for the full stop at the end of the hostname on the right hand side.