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.

How to change Primary Domain landing folder?

Discussion in 'General Discussion' started by kenzhin, Aug 16, 2011.

  1. kenzhin

    kenzhin Registered

    Joined:
    Aug 16, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    a blessed day to all,

    I'm hosting many domains on my hosting account. I want to organize my websites by putting them on separate folders on my public_html. How can I change my primary domain so that when i access www.primarydomain.com it will open the website in public_html/primarydomain but still in the address bar is www.primarydomain.com?

    Another reason I need this is because example I put my second domain to public_html/seconddomain folder, i don't want anybody to access the second domain site by www.primarydomain.com/secondomain. i don't like also my public_html folder to be messy with all those website files. :D

    Many thanks in advance.:)
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You could avoid the addon domains and subdomains being in public_html entirely by ensuring WHM > Tweak Settings > public_html subdomains only is configured for the "off" setting.

    If that is set to off, then when you create an addon or subdomain in cPanel > Addon Domains or cPanel > Subdomains area, simply change the "Document Root:" field to not have public_html listed. It will then create the addon or subdomain in /home/username/subfolder instead.
     
  3. kenzhin

    kenzhin Registered

    Joined:
    Aug 16, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Tristan for your quick reply. I appreciate it so much..

    But I'm just a normal cPanel user. This solution is not applicable for me. Any more solution my friend?

    Thanks,
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Even as a normal cPanel user, do you show "Document Root:" field in cPanel > Addon Domains and cPanel > Subdomains areas? If you do, is the public_html/ folder path editable to remove it? If it is, then your host has allowed you to create subdomains and addon domains using /home/username/subfolder instead and you can use the suggestion provided to do that.

    If you cannot remove public_html in the path for creating a new addon or subdomain, I would suggest asking your hosting provider if they would be willing to set that Tweak Setting to "off" in WHM, explaining why you would like that functionality.

    Otherwise, you'll have to ask your hosting provider to put your main domain to point to a subfolder inside public_html, which is actually a less ideal setup.
     
  5. kenzhin

    kenzhin Registered

    Joined:
    Aug 16, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I see.. Thank you so much my Tristan! ^_^
     
Loading...

Share This Page