• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

02 7903 0216

     

Open Ticket

    

Client Area

FASTDOT Web Hosting Australia

FASTDOT Web Hosting Australia

Australian Cloud Hosting

  • Web Design
    • eCommerce Development
    • Branding
    • Web Design
  • Domains
    • Register
    • Domain FAQ
    • Domain Extensions
    • MyDNS Manager
    • Domain Transfer
  • Hosting
    • WordPress Hosting
    • Sydney cPanel Hosting
    • Magento Hosting – eCommerce Website
    • eCommerce Options
      • Managed Magento Hosting
      • PrestaShop Hosting
      • OpenCart Hosting
      • CS-Cart Hosting
    • Business Emails
  • Cloud Servers
    • VMware ESXi Hypervisor
    • Equinix – ISO Certified Data Centres
    • Cloud Hosting Info
    • Virtual Machines
  • Resources
    • Partner Program
    • Transferring Websites
    • WordPress Tips
    • Email Tutorials
    • Hosting in Australia
    • Apps Galore
    • Tutorials & News
      • SEO
      • VMware VPS Cloud
      • PHP and MySQL
      • Security
      • Linux Guides
      • Server Management
Order Now

CNAME and A records, when should they be used?

September 26, 2012 by Editor

cname and a recordsWhat is the difference between CNAME and A records, and when should they be used? This tutorial is designed to clear up some of the confusion around the differences between CNAME and A (address) records.

Websites are served from locations that are uniquely identified by a group of numbers, which are known as IP addresses; but to access these sites we usually type in their corresponding domain names, which are easier to remember. To find the correct IP address, your browser will contact a Domain Name Server (DNS) and query its database for the IP address.

CNAME and A records

What is an A Record?

An A record is a record in these Domain Name Servers that links or maps a domain directly to its corresponding IP address.

For example, when you type mydomain.com into your browser, your browser will perform a DNS lookup which will return the corresponding IP address eg. 111.222.333.444.

Whas is a CNAME Record?

A CNAME, or Canonical Name record, is a record that points to another domain address rather than an IP address.

For example, say you have several subdomains, like www.mydomain.com, ftp.mydomain.com, mail.mydomain.com etc and you want these sub domains to point to your main domain name mydomain.com. Instead of creating A records for each sub-domain and binding it to the IP address of your domain you can create CNAME records.

As you can see in the table below, in the case where the IP address of your server changes, you only need to update one A record and all the subdomains follow automatically because all the CNAMES point to the main domain with the A record:

(sub)Domain / Hostname Record Type Target / Destination
mydomain.com A 111.222.333.444
www.mydomain.com CNAME mydomain.com
ftp.mydomain.com CNAME mydomain.com
mail.mydomain.com CNAME mydomain.com

Examples of using CNAME records

Domains registered in different countries

CNAME records can also be handy in the case that you registered your domain name in several countries and you want to redirect them all to your main domain. For example mydomain.com.au and/or mydomain.co.nz can be redirected to mydomain.com

Products and brand names

In case you have registered several domain names, for example for your different products or brand names and you want to redirect them all to your main domain, you create CNAME records for all these other domains. For example: myproduct.com > mydomain.com.

Limitations of CNAME records

  1. Usage of CNAME records means that there is an additional request sent to the DNS servers, which can cause a delay of a few milliseconds.
  2. You cannot create a CNAME record for the main domain name (mydomain.com) itself, this must be an A record.
    For example, you cannot map mydomain.com to google.com, however, you can map google.mydomain.com to google.com.
  3. MX or NS (nameserver) records may never point to a CNAME record, only A records.

More great articles

Name Server Delegation
DNS Cache - Clearing DNS Cache and Changing DNS server settings
How DNS Work & How To Edit DNS Records Via cPanel
How to Park a Domain Name

Category iconDNS and Domains

Primary Sidebar

Recent Posts

  • How to Upload Files Using the cPanel File Manager?
  • How To Increase the PHP Max Upload Size in cPanel®?
  • Choosing a hosting platform in 2021
  • VARCHAR vs. TEXT for MySQL Databases
  • What Are the Best Shopify® Alternatives in 2021?
How to Park a Domain Name
Is web hosting included with my domain name registration?
How DNS Work & How To Edit DNS Records Via cPanel
Transfer Your Hosting and Domain Names to Fastdot Web Hosting

Categories

  • Application Hosting
  • Australian Cloud Hosting
  • cPanel Hosting
  • DNS and Domains
  • eCommerce Hosting
  • Email Tutorials
  • Legals
  • Linux Tutorials
  • Operating Systems
  • PHP and MySQL
  • Register a Domain Name
  • Search Engine Optimization
  • Security
  • Server Management
  • Tutorials
  • VMware Cloud Hosting
  • Web Hosting Tutorials
  • WordPress Tips & Tricks
Australian web hosting

Footer

Recent Posts

  • How to Upload Files Using the cPanel File Manager?
  • How To Increase the PHP Max Upload Size in cPanel®?
  • Choosing a hosting platform in 2021
  • VARCHAR vs. TEXT for MySQL Databases
  • What Are the Best Shopify® Alternatives in 2021?

Legals

  • Terms&Conditions
  • SLA
  • Acceptable Usage Policies
  • Privacy Policies
  • About FASTDOT
  • ISO Certified

Contact

Australia: +61 02 7903 0216
Submit a Support Ticket

Company

FASTDOT.COM.AU PTY/LTD
ACN 002 454 631
200 Bourke Rd, Alexandria NSW 2015 Australia
Processing by eWay, PayPal and Bitcoin

blankNSW Government Provider

Made with in Sydney/Australia

Copyright © 2022 FASTDOT.COM

All rights reserved. Return to top