Bummer! This is just a preview. You need to be signed in with a Treehouse account to view the entire video.
CNAME Records1:09 with Jason Seifer
CNAME is short for "Canonical Name". CNAME records are used for aliases when creating domain names.
CName records are written with a dot at the end. A big advantage of CNAME records is aliasing several domains to one IP address which makes it easier to update in the event an IP changes. CName records can also be aliased to hosts outside of the given domain.
Now we're going to be talking about a type of record called the CNAME record.
This is short for the canonical name record, and this type of record is usually used for aliases.
As an example, let's say that you have a restaurant franchise,
and it's located in different cities.
You might have something like city1.restaurant.com, city2.restaurant.com,
city3.restaurant.com, and maybe a whole bunch more.
You could use A records to point all of these different subdomains to a single server,
or you could use a CNAME to point them all back to something like www.restaurant.com,
and then have your web server take care of serving the specific restaurant website from there.
The benefit of something like this is that in the event an IP changes,
you only need to change this in one spot when changing the domain name and not the aliases.
When you're writing a CNAME into your DNS provider, it's usually specified with a dot at the end
because you have to specify the full domain.
You need to sign up for Treehouse in order to download course files.Sign up