Redirect subdomain to subdirectory of same name

slinky

Well-Known Member
Jul 26, 2007
78
2
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!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,883
2,256
463
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.