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

3 Answers 3


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

  • 3
    And the Host header is the only thing that tells the server which hostname was used to reach it.
    – Matti Virkkunen
    Jun 3, 2010 at 14:18

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.

  • 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, 2010 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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