macmartins

Well-Known Member
Feb 17, 2002
55
0
306
Hello !!

I really can know if is possible to put www before a subdomain.

If subdomain is kkkk.domain.com , is possible to access by www.kkkk.domain.com?

Anyone can say to me how to do it?

Thanks!!
 

mesranet

Well-Known Member
May 6, 2002
133
0
316
Yes you can :p

After you add subdomain on cpanel, edit your httpd.conf and find the line of that subdomain:

&VirtualHost XXX.XXX.XXX.XXX&
BytesLog domlogs/subdomain.domain.com-bytes_log
ServerName subdomain.domain.com
ServerAlias www.subdomain.domain.com &&---- Add This Line
ServerAdmin [email protected]
DocumentRoot /home/username/public_html/dirname
CustomLog domlogs/subdomain.domain.com combined
ScriptAlias /cgi-bin/ /home/username/public_html/dirname/cgi-bin/
&/VirtualHost&

Than, restart your Apache. Thats it.

Thank you.
 

macmartins

Well-Known Member
Feb 17, 2002
55
0
306
mesranet, thank you.

But is possible to do it automaticaly for all the subdomains that're added, and that will be add?

Thanks!:)
 

mesranet

Well-Known Member
May 6, 2002
133
0
316
Opsss....

Thats suppose to answer by bdraco or somebody expert, i'm also happy and needed that way will become automatically when i add any subdomain without doing manually. ;)
 

Website Rob

Well-Known Member
Mar 23, 2002
1,504
1
318
Alberta, Canada
cPanel Access Level
Root Administrator
As this topic has recently been covered in other posts and to edit every entry by hand would be just plain nuts, I suggest those wanting to do this study up on &Wildcard DNS Setting& so it is automatically done for all accounts.
 

hst

Well-Known Member
Feb 24, 2002
111
0
316
Adding www changes it to third level

In most cases you wouldn't want to add it as www.sub.yourdomain.com because that makes it a third level domain not a subdomain.