Skip to main content

Subdomain outside of public_html

Comments

4 comments

  • GOT
    I do not think that would be possible. You might be able to get away with manually creating that folder in your public_html and then use a url rewrite in the htaccess to rewrite it back to the subdomain.
    0
  • DennisMidjord
    It is possible, but only if your host allows for it. They'd need to go to WHM > Tweak Settings > Domains > Restrict document roots to public_html and disable it. When the setting is disabled, you can have a document root anywhere in your homedir.
    0
  • GOT
    Agree with @DennisMidjord however, you still won't also be able to access the subdomain as mysite.com/mysubdomain without some kind of rewrite.
    0
  • cPanelLauren
    The only reason mysite.com/mysubdomain works is because that folder is within the documentroot for mysite.com. As noted by @GOT you'd need a rewrite in place to retain this URL if the mysubdomain folder is outside of public_html
    0

Please sign in to leave a comment.