What is the difference between A Name and CName domain (DNS) records? When shoudl you use one over the other? Typically you can edit your DNS records thorugh your hosting companies control.panel or dashboard. Today we will cover all the basics you should know.20th August 2018 Simon Steed
Configuring domains often raises questions : is it best to use an A record for your www domain, or a CName record? Many people - including developers - are sometimes uncertain. But our latest blog post will give you an overview as to when you should use each and what the difference is.
Both CNAME and A Records are part of something called DNS (Domain Name System) – DNS is the process of looking up domain names and converting them into an IP address. To access a website a computer (and web browser) needs an IP address and it is the role of the DNS to convert a domain name into an IP address very much like a telephone directory might do for telephone numbers.
An A Record is used when you want to point to a domain to an IP Address. This is the most common way of pointing your domain to somewhere that has a dedicated IP address. An A Record is the most common way of pointing the main part of your domain to somewhere that has a dedicated IP address. For example, imagine I have the domain mydomain.com, I can use an A record to point this to the IP address 184.108.40.206.
CName (or Canonical Name) records can be used when you wish to point an alias (or subdomain) of your domain to an IP address. For example, if you wanted www.mydomain.com, mail.mydomain.com and ftp.mydomain.com to also point to the same server as domain.com – then you can use a CName record to point all of these to the mydomain.com domain. This can also be useful when your website does not have a dedicated IP address (hence the CName record can point to an existing name, for instance in our example above, this is mydomain.com
Below is a table that shows the records for our sample domain mentioned here:
Domain / Hostname
Target / Destination
If you want to use or configure an A Record for your domain, you can typically do this by visiting your hosting company's control panel or dashboard and choosing ‘manage DNS’ (or words to this effect). Following this should allow you to manage the 'DNS records' for your domain.
It’s common practice to include an “@” A Name record that points to an IP address for the www record of your website. Remember to Update your settings and be aware that it can take up to 24 or 48 hours in some cases for changes made to the DNS to be available to all.
From an SEO point of view, canonicalization is very important. If you have a website that has the same content spread across different URLs, search engines will split the rankings as well. An example is typing a website without the www in the toolbar - this effectively dilutes your presence on the web.Read more