Link to home
Start Free TrialLog in
Avatar of AnthonyWalker
AnthonyWalker

asked on

DNS CNAME records visibility on a web server

Have a question about DNS CNAME records and what web servers see. (unfortunately I don't have an environment where I can just test this)

if I have the following domain names:

domain1.com
domain2.com
www.domain1.com
www.domain2.com

I can create them all as A records pointing directly to the IP address and the web server sees whatever the user types in the browser and everything works as planned.

But to simplify life I'd like to create one of these as the "primary" domain name as an A record and the others as an "alias" domain name with a CNAME record.
So if domain1.com is an A record and domain2.com is a CNAME to domain1.com what does the web server see what the user types in domain2.com ?
Does it see domain2.com or domain1.com ?

Does it depend on the type of web server?
Or does DNS just work it's magic in resolving the domain names to an IP and the web server doesn't know anything about it?
ASKER CERTIFIED SOLUTION
Avatar of Dr. Klahn
Dr. Klahn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AnthonyWalker
AnthonyWalker

ASKER

Thanks, that's what I hoped would be happening.