We help IT Professionals succeed at work.

what is the difference between a CNAME and an A record?

level9tech asked
Medium Priority
Last Modified: 2013-11-30
I don't understand what I need a CNAME record for? I have been only using A records and I guess I don't really understand what a CNAME is or why I would use it. Is it even necessary?
Watch Question

A Record - Returns a 32-bit IPv4 address, most commonly used to map hostnames to an IP address of the host.

CNAME - Alias of one name to another: the DNS lookup will continue by retrying the lookup with the new name. This helps when running multiple services (like an FTP and a webserver; each running on different ports) from a single IP address. Each service can then have its own entry in DNS (like ftp.example.com. and www.example.com.). Network administrators also use CNAMEs when running multiple HTTP servers on the same port, with different names, on the same physical host.
The most popular use the CNAME-record type is to provide access to a web-server using both the standard "www.domain.com" and "domain.com" (without the www).
This is usually done by creating an A-record for the short name (without www), and a CNAME-record for the www name pointing to the short name.
A CNAME-record should always point to an A-record to avoid circular references.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.