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.

Best Way to Setup Subdomains?

Discussion in 'General Discussion' started by raindog308, May 8, 2012.

  1. raindog308

    raindog308 Member

    Joined:
    Apr 16, 2012
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Imagine you have a user named somecorp with the domain example.com:

    Home directory: /home/somecorp
    Web root: /home/somecorp/public_html

    www.example.com - would be served out of /home/somecorp/public_html

    Now he wants to add somesub.example.com

    If you put it in public_html like this:

    /home/somecorp/public_html/somesub/

    then going to www.example.com/somesub will navigate to it. It also looks confusing in the web root - is "somesub" a directory in the main www.example.com web root, or is it a separate subdomain?

    Unfortunately, putting it outside public_html breaks things.

    I wish you could setup like this:

    public_html/example.com - www.example.com
    public_html/somesub.example.com
    public_html/somethingelse.com
    etc.

    ...where each of those is a web root. Alas.

    So how do you do subdomains? Any "best practice"?
     
  2. PlotHost

    PlotHost Well-Known Member

    Joined:
    Apr 29, 2011
    Messages:
    253
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    US
    cPanel Access Level:
    Root Administrator
    Twitter:
    You can make a separate cPanel account for the subdomain. I prefer this approach instead of making a subdomain under the main account.
     
Loading...

Share This Page