301 Redirects | .htaccess Redirects

301 redirect

301 .htaccess redirect is the safest search engine redirect there is! This is also the friendliest method for web page redirection. Most web hosting company and web master out there will definitely recommend this method of web page redirection. The code “301” is interpreted as “moved permanently”.

For websites hosted in either dedicated server or a shared web hosting server, you use 301 redirects in redirecting a single html page or an entire website.

Here’s and example of redirecting a single page/html page:

Redirect 301 /oldpage.html http://www.example.com/newpage.html

For a whole website, you can use 301 redirect in this manner:

Redirect 301 / http://www.example.com/

Personally on my shared web hosted site, I only use the HTML redirect. But there are other use of the 301 redirect on a web sites.

Here are other use of it:

  1. Changed file extension
  2. Redirect web site with ‘www’ to not having one.
  3. vice versa of the previous example.
  4. Redirect example.com/index.php to example.com/

So next time you moved your web site content from one web hosting server provider to another or moving your site to a new domain name, you can definitely use the 301 redirect.

2 thoughts on “301 Redirects | .htaccess Redirects”

  1. Don’t forget 301 redirecting is great if you want to move one directory to another or a directory to the root domain of your website. You can also use mod_rewrite and not have to physically move any files at all.

Leave a Reply

Your email address will not be published. Required fields are marked *