I've been reading on AmazonWS that you use cname to use their webservices. Is CNAME when i have a file like this sarah.example.com/image/2001.jpg and then it really is at blablabla.com/mybucket/sarah/image/2001.jpg ? but the web user doesnt know this? he sees the url adress as in example.com?
|
feedback
|
migrated from stackoverflow.com Oct 21 '10 at 0:30
This question came from our site for professional and enthusiast programmers.
|
CNAME is used in DNS Name Resolution It simply tells the resolver to use the IP of another Domain Name that is already defined. It is nothing more as an alias, see also Justice's answer and the definition. But it is not exchanged in the URL, the CNAME record is only used to lookup the IP of sarah.example.com, and the original url is then used. In your example it would be: When the client is requesting http://sarah.example.com/image/2001.jpg, he first looks up the IP for sarah.example.com. The client asks a nameserver, and the nameserver sees a CNAME record in the DNS entry for sarah.example.com that tells him to use the IP of blablabla.com let's say it is 10.10.10.10, so the nameserver returns 10.10.10.10 to the client. The Client now uses the original url sarah.example.com/image/2001.jpg and requests it from the web server at 10.10.10.10 In the DNS entry for example.com there would somewhere be a line like:
In the DNS entry for blablabla.com:
| ||||
|
feedback
|
|
http://www.google.com/search?q=cname http://en.wikipedia.org/wiki/CNAME_record
| |||
|
feedback
|
|
CNAME is abbreviation for "Canonical Name", which is the 'official' name for the host or resource given. | |||
|
feedback
|
|
For more information you might be interested in some of the related RFCs.
RFC 1034 says "CNAME identifies the canonical name of an alias." In simple terms a | |||
|
feedback
|