why and how to you make a 301 redirect?

  1. blackhatworld profile image55
    blackhatworldposted 7 years ago

    why and how to you make a 301 redirect?

  2. aussiemike profile image56
    aussiemikeposted 7 years ago

    Firstly the why would you create a 301 redirect. A 301 redirect will redirect a visitor to the page on your new domain no matter what link they click through. You may have site users who have bookmarked a certain page and it is much better that they go to the new domain page rather than get a 404 error message.

    A 301 redirect shows search engines that your site has moved to a new address permanently. This is important so search engines will index your new site. I have in the past used 301 RDs when I have several 'add on' domains (not parked as parked domains are ignored by most search engines). In the case of using Google Webmaster tools you need to notify that you have moved the site permanently so they re-index the site with the new domain. More instructions in Google Webmaster Tools.

    How to make one would depend on your server configuration and I suggest a quick search for 'how to make 301 redirect' would give you the answers on how to create one.

    I personally use the .htaccess method as below

    Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.
    The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

    Please REPLACE www.newdomain.com in the above code with your actual domain name.

    In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.

    Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

    I hope this helps anyone with questions about 301 redirects.