3

I believe this is a simple question, I thank you in advance for clearing it up for me.

Using this example:

foo.domain.com        CNAME  bar.example.com
bar.example.com        A      192.168.1.19

The client requests foo.domain.com in their browser.

Does the name lookup simply resolve to 192.168.1.19 and their request is made to the server at that address with host header foo.domain.com? Or are they actually redirected and their request is made with host header bar.example.com?

Do I need to configure the server to listen on the new host name (foo.domain.com), with a valid SSL cert for it, etc? Or is the existing configuration for bar.example.com sufficient?

8

DNS request is resolved first and then the browser connects to 192.168.1.19 with the following header:

Host: foo.domain.com

So yes, you have to configure a virtual host for foo.domain.com. Also, you will need a SSL certificate for foo.domain.com, because I suppose that you current SSL certificate is for bar.example.com.

3

Because hosts are in different zones, don't forget trailing dot after hostname in CNAME

foo.domain.com CNAME bar.example.com.

Does the name lookup simply resolve to 192.168.1.19 and their request is made to the server at that address with host header foo.domain.com?

Yes, exactly

Do I need to configure the server to listen on the new host name (foo.domain.com), with a valid SSL cert for it, etc?

Yes, at least it's true for Apache (newer used IIS). Don't forget - you can't use different certs for different hosts on the same IP and the same port. Your have to use wilcard cert of differentiate https ports per site

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.