CNAME problem

pppplus

Verified User
Joined
Dec 19, 2008
Messages
526
Hi,

I test utilisation of CNAME to redirect domainA to domainB

I use this domain: tout-est-gratuit.fr
2 CNAME entries :
www.tout-est-gratuit.fr CNAME mon-internet.com
tout-est-gratuit.fr CNAME mon-internet.com
(I delete all other entries)

If I ping www.tout-est-gratuit.fr or tout-est-gratuit.fr, that's ok, I have the answer : ping sur mon-internet.com 94.23.219.25
That's OK

But when I open www.tout-est-gratuit.fr on Firefox, I have this answer :
Apache is functioning normally

So I suppose, I have something to do in my domain mon-internet.com, but what ?

All domains are real, so you can test to view results (maybe you will ping another domain than mon-internet.com, it depends of DNS propagation, but the problem is the same)

Thanks for your help.
 
This is a very common error.

Short answer: use the "domain pointers" interface within DirectAdmin

Long answer:
A CNAME is just a DNS record.

When a Web client opens a web page with the standard HTTP protocol (1.1), it resolves the hostname thanks to DNS but it also sends the hostname through the Host header.

That's the only way a server may know which website the client want to see, and of course the server has to know with Host correspond to which website (or VirtualHost, for Apache).

DirectAdmin takes care of BIND (DNS) + Apache (VirtualHost) configuration for aliases (see a website through another hostname) and pointers (redirect to a given website from another hostname) when using the "domain pointers" interface.
 
Yes perfect ! Thanks.

Now another problem !

I need to redirect them not to a domain, but to a subdomain.
And all subdomain are used dynamically (not real subdomains, only virtual subdomains) with this in httpd conf : ServerAlias *.|DOMAIN|

Do you have an idea, to do this ?

So each domain has to redirect to a virtual subdomain

DomainA => subX.mon-internet.com
DomainB => subY.mon-internet.com
DomainC => subZ.mon-internet.com

So with domain pointer, I can only go to the domain.

Sorry for my poor english... I hope my explanations are clear.
 
Sorry, forgot my last question !

It was a misconfiguration. I just have to modify my script to give the good subdomain to the good domain !

Thanks for your quick reply !!
 
Back
Top