Proper use of CNAME

dwok derek at wubbafish.net
Mon Sep 19 14:33:53 UTC 2005


Hi All,

  I have been tasked with a problem that I think can and should be
solved with DNS CNAME records but I want to see what other people have
to say.

  I have a client that has registered a large number of different
variations of their domain name. For example:

companyname1.com
companyname1.net
companyname2.com
companyname2.net

  They have asked me to modify the ASP script of their home page to
parse the incoming Host Name and redirect to their main Host Name
www.companyname.com. They want to do this so cookies handling will be
maintained properly no matter which domain name the browser comes in
through.

  It is easy to do this by just redirecting the user to the main domain
name www.companyname.com. However I was thinking that a CNAME record
would be the best way to handle this. This way I save the user from
having to be redirected to the web server. This is what I was thinking
(using the domains above):

companyname1.com CNAME www.companyname.com
companyname1.net CNAME www.companyname.com
companyname2.com CNAME www.companyname.com
companyname2.net CNAME www.companyname.com

  Is this the correct use of a CNAME record? Thank you in advance for
any advice or suggestions.



More information about the bind-users mailing list