The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect subdomain to subdirectory of same name

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

Tags:
  1. slinky

    slinky Well-Known Member

    Joined:
    Jul 26, 2007
    Messages:
    71
    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:
    37,064
    Likes Received:
    1,288
    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.
     
Loading...

Share This Page