The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

www before subdomain

Discussion in 'General Discussion' started by macmartins, Feb 16, 2003.

  1. macmartins

    macmartins Well-Known Member

    Joined:
    Feb 17, 2002
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    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!!
     
  2. mesranet

    mesranet Well-Known Member

    Joined:
    May 6, 2002
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    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 wwwadmin@domain.com
    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.
     
  3. macmartins

    macmartins Well-Known Member

    Joined:
    Feb 17, 2002
    Messages:
    55
    Likes Received:
    0
    Trophy Points:
    6
    mesranet, thank you.

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

    Thanks!:)
     
  4. mesranet

    mesranet Well-Known Member

    Joined:
    May 6, 2002
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    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. ;)
     
  5. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    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.
     
  6. hst

    hst Well-Known Member

    Joined:
    Feb 24, 2002
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
Loading...

Share This Page