How to make a correct (SEO-friendly) 301 recirect with cPanel

5 replies
Hi guys,

I've seen a lot of confusion with redirects in cPanel, there are wrong ways to do it and there are correct ways to do it.

When I first tried to do it myself I found a lot of conflicting information on this issue when searching for it, so I'd like to quickly share with you how it's done cocorrectly, which is: a 301 redirect that is google-friendly.

It's pretty easy, so here we go:

1) log into the cPanel account of the domain you want to redirect TO.
(e.g. sampledomain.com)

2) go to "add parked domain".
3) add the domain you want to be redirected, e.g. thisredirectstosampledomain.com
4) after you added it, at the bottom, create a redirect; make sure to enter the target domain correclly, which is: "http://www.sampledomain.com./"
- don't forget the ./
5) DONE!

To check the redirection go Redirect Checker or any other redirect checker tool of your choice.

Hope it helps!

Cheers,
Rob
#301 #correct #cpanel #make #recirect #seofriendly
  • Profile picture of the author candyo0
    Ok, let’s start writing some 301 redirects. Here are a few different examples:

    EXAMPLE #1: You changed a file name for a file on your website. The old file name is /old-page.html and the new file name is /new-page.html. You would set up a 301 redirect by typing this into your .htaccess:

    redirect 301 /old-page.

    EXAMPLE #2: You changed a page on your site from being a .html page to a .php page. The old file name is /your-page.html and the new file name is /your-page.php. You would set up a 301 redirect by typing this into your .htaccess:

    redirect 301 /your-page.

    EXAMPLE #3: You would like to show an affiliate offer on your website. The link to the affiliate offer is merchantdomain.com&affid=348665209. You would rather have a more user friendly looking URL be used for the link because some people may not want to click on an affiliate offer or they may not understand what the extra numbers (your affiliate tracking ID so that you get credit) really represent. You would first create a new page called /merchant-offer.html on your site to place in a folder you name “click” (or whatever you like) that will be used in place of your affiliate link. You then set up your link on your site pointing to yourdomain.com/click/merchant-offer.html and be sure and use the rel=”nofollow” and enter this into your .htaccess:

    redirect 301 /click/merchant-offer.
    Now that you know how to set up 301 redirects be sure and try out our domain name finding tools to find some great domain names that can help to make you an online success.
    {{ DiscussionBoard.errors[5112051].message }}
  • Profile picture of the author RobKonrad
    Hi Candy,

    that's for individual pages - for people with less knowledge, I'd recommend using a plugin such as

    WordPress › Redirection « WordPress Plugins

    (in a Wordpress environment).

    Makes your life easier ;-)

    Cheers,
    Rob
    Signature
    ================================================== ===
    This blog is awesome: http://www.robkonrad.com/blog. Read it.
    ================================================== ===
    {{ DiscussionBoard.errors[5187348].message }}
    • Profile picture of the author plantpotphil
      I recently had HUGE problems with 301 redirects entered through cPanel's UI.

      It turned out there was a limit to how many redirects you can place in the htaccess file. (I had a lot, around 120).

      After contacting the cPanel guys I found out there was an ad-hoc limit of around 80 redirects. This was a few months ago now though, so I'm not sure if this has been changed.
      {{ DiscussionBoard.errors[5192504].message }}
  • Profile picture of the author RobKonrad
    Hm, question is - why would you use that many redirects?

    And - WHEN you are using that many, probably it's better to go the direct way. This was more of a guide for single domain redirects. That you hijacked and spoiled now

    Cheers,
    Rob
    Signature
    ================================================== ===
    This blog is awesome: http://www.robkonrad.com/blog. Read it.
    ================================================== ===
    {{ DiscussionBoard.errors[5222694].message }}
  • Profile picture of the author krreddy
    I have 301 and 302 error of 3000 Plus please tell me how to fix them .i am using wordpress and i knew how to redirect from cpanel also but to which page i need to redirect all errors and do i need to do it for each page .
    {{ DiscussionBoard.errors[7282282].message }}

Trending Topics