Setting up a 301 Redirect

Blogon April 13th, 2010No Comments

What is a 301 redirect?

A 301 redirect is like a party that has moved. You arrive at the party and there is a sign on the door telling you to go to the next building because the party has been moved.

In a similar fashion, a 301 redirect is code that tells your browser that your website has moved from one location to another on the back end and automatically sends your user there on the front end. There are some handy reasons to set up a 301 redirect. A few of those reasons are to:

  • Redirect users from http://yoursite.com to http://www.yoursite.com.  This is beneficial so that Google knows you just have one of those sites going.
  • If you have changed company names, and thus URLs, your website can automatically send the user to your new website if they type in your old domain name.
  • Say your business has a difficult name, you could redirect common misspellings of the URL to the real URL.
  • The URL shortener sites use this technique to have a short URL point to a long URL.

So, how do you set up a 301 redirect?  First off, create a 1.htaccess file on your computer’s text editor.  Type in the text below, and then upload this file to the root of your website folder.  The most basic redirect is:

redirect 301 “/old/index.html”  http://www.newsite.com/

A second redirect is from http://yoursite.com to http://www.yoursite.com.  Here is the code for that 301 redirect:

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^dragonboatatlanta.com [nc]
rewriterule ^(.*)$ http://www.dragonboatatlanta.com/$1 [L,R=301]

This should be a common step in setting up your website to make sure that the search engines know that you just have one site, and not two containing the same content.

And best of all, 301 redirects are SEO friendly.

Related posts:

  1. SEO-Friendly Fonts
  2. Remove index.php from Joomla URL’s
  3. Send HTML Newsletters through Entourage
  4. Can’t Copy Text from a PDF File
  5. Moving from Blogger to WordPress
No Responses to “Setting up a 301 Redirect”

Leave a Reply