Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Redirect subdomain to subdirectory of same name

Discussion in 'Bind/DNS/Nameserver' started by slinky, Jan 8, 2017.

Tags:
  1. slinky

    slinky Well-Known Member

    Joined:
    Jul 26, 2007
    Messages:
    74
    Likes Received:
    1
    Trophy Points:
    58
    I've noticed that I've got a subdomain that used to exist and requires redirect to a subirectory of the same name, e.g. blog.site.tld is now www.site.tld/blog/ . A subdomain must be created in order to be recognized so that a redirection will work. But the subdomain creation assumes that a subfolder/directory is created off the root of the same name - which would conflict with the existing /public_html/blog/ directory. Hoping someone can provide a solution. Thank you!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,961
    Likes Received:
    1,821
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You can choose the document root of your preference when creating the subdomain in cPanel. Simply use the document root that includes the website files you want loaded when accessing that subdomain, and then click on "Manage Redirection" in the cPanel interface after creating the subdomain if you want to redirect it elsewhere.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice