Skip to main content

How to do a 301 redirect from one cPanel account domain to another

Comments

4 comments

  • cPanelLauren
    The redirects interface in cPanel>>Domains>>Redirects will let you accomplish this. I also updated the thread title for you.
    0
  • ctyler
    @cPanelLauren, Thank you for updating my title (how embarrassing) Just to clarify. I have three domains a.com, b.com, and c.com on separate cPanel accounts. I want a.com and b.com to redirect to c.com and remove those cPanel accounts. So if I log into c.com, I cannot redirect a.com or b.com to c.com because they are under different accounts. In order to redirect, a.com and b.com, I would need to log into those accounts and set up the redirect there. If that is the case, what happens to the redirect once I remove the a.com and b.com cPanel accounts?
    0
  • Handssler Lopez
    @cPanelLauren, Thank you for updating my title (how embarrassing) Just to clarify. I have three domains a.com, b.com, and c.com on separate cPanel accounts. I want a.com and b.com to redirect to c.com and remove those cPanel accounts. So if I log into c.com, I cannot redirect a.com or b.com to c.com because they are under different accounts. In order to redirect, a.com and b.com, I would need to log into those accounts and set up the redirect there. If that is the case, what happens to the redirect once I remove the a.com and b.com cPanel accounts?

    In this case the redirect is lost since when you delete the accounts you delete all the content including the .htacces where the 301 redirect is created It is somewhat rough but you can - add the domains a.com and b.com in cpanel c.com as additional - in a.com and b.com create .htaccess and add the following line redirectMatch 301 ^(.*)$ https://c.com
    ** remember to change c.com for the correct domain *** This is only to redirect any domain links not emails
    0
  • samajkapoor
    You need to add following lines in htaccess and change example.com to old domain and example.net to new domain RewriteEngine on RewriteCond %{HTTP_HOST} ^example.com [NC,OR] RewriteCond %{HTTP_HOST} ^www.example.com [NC] RewriteRule ^(.*)$
    0

Please sign in to leave a comment.