Skip to main content

Subdomain and Document Root Help

Comments

4 comments

  • cPanelLauren
    So those latter two URLs are present because the folder for the subdomain exists inside the root domain's document root. The only way to avoid this would be to move the data outside the document root - so outside of public_html and into /home/$user/
    0
  • sidcaan
    Thank you @cPanelLauren, I did think of that but then thought that maybe it won't be accessible via the web. Will try it and if there's any issues I'll ask here.
    0
  • sidcaan
    @cPanelLauren tried your suggestion, but unfortunately the document root cannot be outside of public_html. It just isn't physically possible. Any other suggestions?
    0
  • cPanelLauren
    It is possible but it may be that your provider has restricted document roots to public_html which is a setting that can be changed in WHM's Tweak Settings interface. Otherwise, it's not possible to do as far as I am aware - besides redirecting domain.tld/folder to sub.domain.tld which is possible to do in the cPanel interface.
    0

Please sign in to leave a comment.