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!

Easier way to redirect subdomain pages to new domain

Discussion in 'Workarounds and Optimization' started by M Rich, Mar 8, 2017.

  1. M Rich

    M Rich Registered

    Mar 8, 2017
    Likes Received:
    Trophy Points:
    North Carolina
    cPanel Access Level:
    Root Administrator
    I am running several sites on the same IP address. They are WordPress sites and I understand that any Rewrite commands in .htaccess have to be above the CMS/ (Begin WordPress) commands in .htaccess

    "" has a subdomain- ""

    I have moved everything from "" to ""

    An issue with the move is that files are named differently---

    "" are now named ""

    Using Cpanel--I created a redirect for the main directory (then copied and pasted code to the space above CMS section of the file)

    "" to ""--works like a charm


    "" does not redirect to ""

    I created in the .htaccess file of "" this redirect:

    "" to "" -works like a charm

    I can now redirect: to "" (but it takes creating the rewrite rules in two places)


    1) Is there an easier way to do this?
    (I personally would not have changed directories of the files like an assistant did--and I think that might have solved the issue--but I am not going to ask him to go back and change all of the work already done)

    2) Is there a limitation to the number of directories from a subdomain that can be redirected--
    Ex: "" to "" OK
    Ex: "" to "" OK
    Ex: " to " OK
    Ex: "" to "" BAD

    I originally tried to do a wild card redirect for the subdomain, but basically only the home page of the subdomain would go to the home page of the new was not doing what I needed it to do.

    Without further guidance, I was not going to manage the subdomain on my GoDaddy account because I often end up getting 500 errors.

    Trying to get a handle on this and learn how .htaccess works in CPanel.
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

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

    Could you let us know the contents of the existing .htaccess file that's utilized in the document root of the domain name?

    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