Subdomain www (cname fix not working)

tao700

Registered
May 7, 2003
1
0
151
Having trouble getting subdomains to resolve with www. in front of the subdomain.

I have tried adding a CNAME record but when I call the www.subdomain.maindomain.com the browser just serves the generic Apache test page not the real subdomain.maindomain.com index page.


This is how I set up the CNAME Entry:

In WHM - DNS Function - Edit DNS Zone

Select the DNS Zone which has the subdomain you want. Add the CNAME Entry

www.subdomain.maindomain.com. IN CNAME subdomain.maindomain.com.

as suggested by senior member parag in the thread "how to make subdomains work with www"
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,531
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
You must also add the ServerAlias for the www.sub.domain.com to the httpd.conf for that sub.domains.com's area.

like so;

<VirtualHost xxx.xxx.xxx.xxx>
ServerAlias www.sub.domain.com sub.domain.com
BytesLog domlogs/sub.domain.com-bytes_log
User username
Group grpname
ServerName sub.domain.com
ServerAdmin [email protected]
DocumentRoot /home/username/public_html/sub
CustomLog domlogs/sub.domain.com combined
ScriptAlias /cgi-bin/ /home/user/public_html/sub/cgi-bin/
</VirtualHost>
 

macdabby

Member
Aug 5, 2003
7
0
151
same thing here

I am having the same problem. It seems that www.domain.com works SOMETIMES on only SOME domains! i checked httpd.conf, and www.domain.com is listed in there right before domain.com. What else could be wrong? Is there software that needs to be updated? I am pretty sure I have the latest stable builds of everything