Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What are CNAME and A DNS records? What are they used for? What is the difference between the two?

Edit: Where does the CNAME record exist? On the server or with the domain registrar?

share|improve this question
Sevki has answered your question very adequately. I would also recommend you read through the Wikipedia article on the Domain Name System to get a broad idea of how DNS works beginning to end. – Steven Xu Dec 20 '10 at 9:05
up vote 4 down vote accepted

A cname record is a pointer that points to a fully qualified domain name(fqdn), an A Record is a pointer that points to an ip adress.

Edit: these records exist on your aptly named Name Server (aka NS) which your registrar points to.

Edit #2: A CNAME record would in some cases is preferred to a a record where you can't actually point to an IP address because it changes. One example of this would be a cloud service where the server IP address changed and the service doesn't manage your name records you have to use a CNAME to point to an address that they can dynamically update. Another one would be the DDNS services, most of the modern dsl modems support this feature, when enabled at your modem every time the ip address changes your modem updates the service and you have one up-to-date fqdn which later you can point to.

share|improve this answer
this is technically correct but it doesn't really cover why someone would use a cname rather than another a record. – JamesRyan Dec 21 '10 at 14:59
An example for CNAMES is if you were using services such as DynDNS or No-IP as they provide you with FQDNs and not IP addresses. – Dan Nov 22 '13 at 10:31

Cname record

A record: Returns a 32-bit IPv4 address, most commonly used to map hostnames to an IP address of the host, but also used for DNSBLs, storing subnet masks in RFC 1101, etc.

See List of DNS record types

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.