Dissecting DNS – CNAME Records
CNAME records are domain name aliases. On the Internet, machines will often have multiple functions such as web-server, ftp-server, chat-server etc. CNAME-records can be used to give a single computer multiple aliases to mask this.
For example machine “www.machine.com” may be both a web-server and an ftp-server, so the two CNAME-records are defined as www.machine.com = example.com and ftp.machine.com” = example.com. Perhaps a better way to explain it is a computer hosting a web site must have an IP address in order to be connected to the web.
The DNS resolves the computer’s domain name to it’s IP address, but often on reseller hosting, more than one domain name resolves to the same IP address, cue the usefulness of CNAME. A machine can have an unlimited number of CNAME aliases, but a separate CNAME record must be in the database for each alias. Where single server web app hosts many different domain names such as web servers that host many sites.
The most popular use the CNAME-record type is to provide access to a web-server using both the standard “www.webdomain.com” and “webdomain.com”. 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. CNAME-records can also be used when a machine or service needs to be renamed, to temporarily allow access through both the old and new name. CNAME-record should always point to an A-record to avoid circular references.
Posted: April 9th, 2008 under Domains, SEO, Technology.
Tags: A Record, CNAME, Domains, Web
