Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

A newbie question regarding dns records

Let's say I've configured, abc.example.com -> A 10.x.x.x

and a CNAME for xyz.example.com CNAME for xyz.example.com -> abc.example.com

when a user does an http request for xyz.example.com what happens when the request reach the 10.x.x.x server. Will the URL be abc.example.com or xyz.example.com? (trying to find out if virtual host in apache need to be updated)

Thanks much

share|improve this question

migrated from stackoverflow.com Jun 3 '10 at 15:05

This question came from our site for professional and enthusiast programmers.

3 Answers 3

It will be xyz.example.com - the Host: header will contain the origially requested domain, not the canonical one from DNS

share|improve this answer
And the Host header is the only thing that tells the server which hostname was used to reach it. –  Matti Virkkunen Jun 3 '10 at 14:18
thanks a lot... –  Traveller Jun 3 '10 at 15:03

The virtual host (as sent in the host header) will be exactly what the user typed into the address field, unless you do some kind of redirect on the server.

share|improve this answer
Would ServerAlias do redirection as well? There is a v host entry for abc...our sysadmin has added ServerAlias as xyz.example.com and says that will do the redirection as well. –  Traveller Jun 3 '10 at 14:54

I agree with answer from Paul Dixon and calmh.

As far as my understanding goes, in normal conditions the header will be xyz.example.com, only an explicit redirect, not in the DNS server but an Reverse Proxy or on the Webserver can eventually change the HTTP header of the request.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.