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.

  1. slinky

    slinky Well-Known Member

    Jul 26, 2007
    Likes Received:
    Trophy Points:
    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. is now . 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

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    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...

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