I have a server called cname.booking.com.au.

I'd like to be able to create multiple other websites, that are like a customised version of cname.booking.com.au. For example I'd like to create a website called booking.updog.com.au.

So in my DNS settings for booking.updog.com.au I created an entry: booking 3600 IN CNAME cname.booking.com.au.

I expected that when I browse booking.updog.com.au, it would produce the same content as cname.booking.com.au, with the ability to customise the look and feel so that it looks like a different website, but it doesn't work. I don't know why.

The only way I can see this working is if cname.booking.com.au can somehow have a Virtual Host setting somewhere that maps booking.updog.com.au to an IP address, but I don't know how.

Someone who has done this successfully is Campaign Monitor. Campaign Monitor has a server called cname.sendcreate.com and I have a website called email.marketingmix.com.au and in my DNS settings I have a record: email 3600 IN cname.sendcreate.com and it works. So I think if I understood how something like cname.sendcreate.com is setup, I'd be able to answer my own question.

  • 1
    CNAME is specifically a DNS reference. You are using it to describe something else. The CNAME is performing exactly as it should. It's sending you to the same server. Everything you're expecting after that.. has nothing to do with CNAME. What I think you're asking... yes it can be done with separate virtual hosts in apache, it can probably be done without having to create separate virtual hosts in apache as well but you'd have to get far more detailed on what you're expecting other than the ability to customize the look and feel.
    – user143703
    Sep 15, 2016 at 5:39

1 Answer 1

 booking 3600 IN CNAME cname.booking.com.au

This is a DNS record that is saying if someone types booking.updog.com.au then redirect them to cname.booking.com.au and this will basically take them to the same site. You can't have a different look and feel this way.

CNAME records are just another name for the same host.

You are correct in saying you will need virtual hosts. Assuming this site is running on Apache, you can create virtual host entries each pointing to a different directory on your web server.

So cname.booking.com.au is a website inside directory /var/www/html/cname

and booking.updog.com.au is a website inside directory /var/www/html/booking

Point being these will be separate sites hosted by the same web server with same public IP.

  • 1
    You don't really need a new directory, if you code a site to support detecting the Host name a visitor is using, you generate the corresponding look and feel from there.
    – HBruijn
    Sep 15, 2016 at 6:01

Not the answer you're looking for? Browse other questions tagged .