The Domain Name System (DNS) can be viewed as a large phone book that contains information about every domain name on the internet. Whilst a domain name will always remain the same, information associated with the domain name will frequently change.
Therefore, when you move your website from one website hosting company to another, you change your DNS Servers accordingly so that internet users can still view your website.
There are other types of records you can change for your domain name in addition to the Domain Name System name servers. In this article, I would like to give you a brief understanding of what these records are and how they can be used.
DNS Host Record Types
When you first encounter DNS records, the options available to you can be a little overwhelming as the documentation provided by domain registrars on this topic is minimal.
If you are in doubt about what information to enter, please speak with your hosting company or domain registrar for guidance on this issue.
Below is a list of the most commonly used DNS record types:
- NS (Nameserver) – Defines what nameserver is responsible for a domain. Please read my article on DNS Servers for more information about modifying a domain name’s nameserver record.
- A (Address) – Sometimes referred to as address records or host records, an A record informs a DNS server what IP address to use for a particular host name.
- AAAA (IPv6 Address) – Whereas an A record will refer to an IPv4 address, AAAA (Quad A) records refer to IPv6 addresses. Apart from this difference, the functionality provided by both records is the same.
- CNAME (Alias) – Short for Canonical Name, a CNAME record informs the DNS that this host name is an alias of another domain name. A CNAME record should have no other records defined.
- MX (Mail Exchange) – This record type helps you direct emails sent to your domain to a specific email service or specific email address.
- TXT (Text) – A TXT record does not change anything with your domain. It simply gives information to others. It can be used, amongst other things, to verify ownership of a domain.
Some less common DNS records you may find useful are:
- LOC – Lets you add information about a location to your domain name such as latitude, longitude, and altitude.
- SRV – Points one domain name to another using a a specific destination port.
The above list displays the most widely used host records. For a complete list of DNS host records, please read this “List of DNS record types” article on Wikipedia.
Additional Non-Native DNS Records Types
Some domain registrars offer additional non-native DNS records as an option.
Two common options that are available are URL redirects and URL frames. A URL redirect will redirect a domain to a specific URL using a HTTP 301 redirect. A URL frame is similar in that the content of the page uses the redirected URL, however the URL in the address bar remains the same.
For example, if I had to use a URL redirect on this domain using Google.com, anyone who visited a KevinMuldoon.com URL (i.e. not just the home page) into their browser address bar will be automatically redirected to Google.com. If I had to use a URL frame instead, the user would still be redirected to Google.com, however the URL displayed in the address bar would state KevinMuldoon.com.
Wherever possible, I register an additional domain name for each forum I run online so that I own WORDforum.com and WORDforums.com. I then use a URL redirect to direct traffic from one domain to the other.
Take my internet marketing community Rise Forums, for example. If someone incorrectly types riseforum.com instead of riseforums.com, they will automatically be redirected to the correct URL.
Examples of DNS Record Usage
The most effective way for me to illustrate how DNS records can be used is to show you an example for each type.
Records normally have three fields: Type, Name, and Value.
Another field you may see offered by some domain registrars and hosting related services is TTL(Time to Live). The TTL value can be set automatically or can be defined in minutes, hours, or days.
A priority field is sometimes available too. It is used in MX records to signify the order in which values should be processed.
An A record points a domain or subdomain to an IP address.
In the example below I have used the Google IP address 188.8.131.52 to show you how A records work.
The @ symbol can be used to the domain being modified. Therefore, the first record in the table above states that Google.com should point to the IP address 184.108.40.206.
FTP defines the IP address of the FTP server for the domain.
In computing, localhost resolves to the IP address 127.0.0.1 and allows internet users to enter the domain name and not a hard-to-remember IP address.
A (Address) records can be used in many other useful ways. For example, they can be used to control subdomains and point visitors to external locations.
- A WordPress.com blogger could direct blog.domain.com to their WordPress.com hosted blog
- A seller could direct shop.domain.com to their eBay store
- A website owner could direct forums.domain.com to a hosted forum solution
Be sure to speak to your website hosting company if you are unsure about how to map a particular domain or subdomain to a specific location. They have a lot of experience in this area and will point you in the right direction.
One of the most common uses of a CNAME record is to ensure that a website will load with or without the www subdomain.
The example below shows you how I ensure that those who type www.kevinmuldoon.com into their browser and those who enter kevinmuldoon.com reach my website.
Most domain registration companies add a CNAME alias for domain names automatically, but some companies do not and website owners frequently forget to add a CNAME alias for their website. This can result in traffic being lost as visitors who land on your preferred domain.
From a security point of view, it stops your server IP address being visible in emails and makes it more difficult for hackers to attack you. It also ensures that you can still access emails if your server or hosting webspace is down.
When you use Google Apps for Work to send emails, Google asks you to define several MX records on your domain. The table below shows the records that Google recommends users add.
|Blank or @||3600||MX||1||ASPMX.L.GOOGLE.COM|
|Blank or @||3600||MX||5||ALT1.ASPMX.L.GOOGLE.COM|
|Blank or @||3600||MX||5||ALT2.ASPMX.L.GOOGLE.COM|
|Blank or @||3600||MX||10||ALT3.ASPMX.L.GOOGLE.COM|
|Blank or @||3600||MX||10||ALT4.ASPMX.L.GOOGLE.COM|
In the above table the TTL value is the number of seconds before subsequent changes to the MX record go into effect.
With regards to priorities, Google states that:
“Mail is delivered to the server with the highest priority first. If for some reason that server isn’t available, mail is delivered to the server with the next highest priority, and so on through all your the servers.”
You are typically asked to add MX records to your domain when you are using a third-party email service so be sure to follow their advice on what values you need to add in those records and be sure to contact their support department if you are unsure of anything.
When you use Google Apps for Work as your email service, Google ask you to add a TXT record to your domain to verify that you have the rights to use an email account associated with your domain. This ensures that only I can use a branded kevinmuldoon.com email address (and people who I set up emails for).
The example that Google gives for adding a TXT record to your domain can be seen below.
|Blank or @||86400||TXT||v=spf1 ip4:220.127.116.11 ~all|
As I noted earlier in this article, a TXT record does not change anything. It simply gives information; which is why it is such a useful took for verifying ownership.
There are different types of TXT records available to you.
The type of TXT record used about is an SPF Record. This can be used to authorise a particular host name or IP address that is allowed to send emails from the domain name; which helps prevent spam.
Please start a thread on Rise Forums if you need help with changing your domain name’s nameservers or host records.