Forward using CNAME record

Torinthiel torinthiel at
Tue Jan 25 15:40:52 UTC 2011

Dnia 2011-01-25 10:18 Henry Hartley napisał(a):

>My apologies if this gets to the list twice. I tried to post it through 
>the web interface but it seems to have been dropped by whatever 
>screening gets applied.
>I'm not sure if I've misunderstood the use of CNAME or if I've simply 
>done something wrong.
>I have two domains that I want to forward. One is working properly and 
>the other is not. In both cases I want users to enter a URL in their 
>browser ( and be forwarded to a different system, where 
>the user has their site. In the working case, the forwarding it to 
> so I have the following in my zone file:
>When you point your browser to (obviously not
>"example") the page on loads properly but is 
>still displayed in the address bar.
>In the second case, which is NOT working, I have a similar CNAME record 
>but instead of, it's on So, I have this (this is 
>the actual domain):
>If you go directly to, the site loads, but if 
>you go to, you get a 404 error page. The 
>browser still displays in the address bar.
>So, is this a situation where is set up to recognize 
> properly but is not? Or what?
>Should I be able to do what I'm trying to do?

No, not exactly. your name properly resolves to the same domain as Your DNS setup is perfectly correct. But the web 
server is not configured to handle
If you go to it handles the name correctly and gives 
your page. But when faced with a name it doesn't recognize it falls back to 
default site.

If you have a web panel to configure your hosting, look for something named 
alternative domain names, aliases, virtual hosts or virtual servers.

The name that is sent to the web serwer is the one typed in browser, and has 
nothing to do with any CNAME records on the way. The web server must be  
configured to handle it.

More information about the bind-users mailing list