How to Redirect a Web Page Using a 301 Redirect



By Herman Drost

You’ve just redesigned some pages of your web site. The
pages have high search engine rankings that you don’t want
to lose. How can you safely redirect web site traffic from
your old pages to the new pages without losing your
rankings? You can do this by using a ” 301 redirect ”

What is 301 redirect?

301 redirect is the best method to preserve your current
search engine rankings when redirecting web pages or a web
site. The code “301″ is interpreted as “moved permanently”.
After the code, the URL of the missing or renamed page is
noted, followed by a space, then followed by the new
location or file name. You implement the 301 redirect by
creating a .htaccess file.

What is a .htaccess file?

When a visitor/spider requests a web page, your web server
checks for a .htaccess file. The .htaccess file contains
specific instructions for certain requests, including
security, redirection issues and how to handle certain
errors.

How to implement the 301 Redirect

1. To create a .htaccess file, open notepad, name and save
the file as .htaccess (there is no extension).

2. If you already have a .htaccess file on your server,
download it to your desktop for editing.

3. Place this code in your .htaccess file:

redirect 301 /old/old.htm http://www.you.com/new.htm

4. If the .htaccess file already has lines of code in it,
skip a line, then add the above code.

5. Save the .htaccess file

6. Upload this file to the root folder of your server.

7. Test it by typing in the old address to the page you’ve
changed. You should be immediately taken to the new
location.

Notes: Don’t add “http://www” to the first part of the
statement – place the path from the top level of your site
to the page. Also ensure that you leave a single space
between these elements:

redirect 301 (the instruction that the page has moved)

/old/old.htm (the original folder path and file name)

http://www.you.com/new.htm (new path and file name)

When the search engines spider your site again they will
follow the rule you have created in your .htaccess file.
The search engine spider doesn’t actually read the
.htaccess file, but recognizes the response from the
server as valid.

During the next update, the old file name and path will be
dropped and replaced with the new one. Sometimes you may
see alternating old/new file names during the transition
period, plus some fluctuations in rankings. According to
Google it will take 6-8 weeks to see the changes reflected
on your pages.

Other ways to implement the 301 redirect:

1. To redirect ALL files on your domain use this in your
.htaccess file if you are on a unix web server:

redirectMatch 301 ^(.*)$ http://www.domain.com
redirectMatch permanent ^(.*)$ http://www.domain.com

You can also use one of these in your .htaccess file:

redirect 301 /index.html http://www.domain.com/index.html
redirect permanent /index.html http://www.domain.com/index.html
redirectpermanent /index.html http://www.domain.com/index.html

This will redirect “index.html” to another domain using a
301-Moved permanently redirect.

2. If you need to redirect http://mysite.com to
http://www.mysite.com and you’ve got mod_rewrite enabled on
your server you can put this in your .htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]

or this:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

Tip: Use your full URL (ie http://www.domain.com) when
obtaining incoming links to your site. Also use your full
URL for the internal linking of your site.

3. If you want to redirect your .htm pages to .php pages
andd you’ve got mod_rewrite enabled on your server you can
put this in your .htaccess file:

RewriteEngine on
RewriteBase /
RewriteRule (.*).htm$ /$1.php

4. If you wish to redirect your .html or .htm pages to
.shtml pages because you are using Server Side Includes
(SSI) add this code to your .htaccess file:

AddType text/html .shtml
AddHandler server-parsed .shtml .html .htm
Options Indexes FollowSymLinks Includes
DirectoryIndex index.shtml index.html

Frequently Asked Question:
What’s the difference in using a 301 redirect versus a meta redirect?

Meta Redirect
To send someone to a new page (or site) put this in the head of your
document:

<meta http-equiv=”refresh” content=”10;
url=http://mynewsite.com/”>

Content=”10; tells the browser to wait 10 seconds before
transfer, choose however long you would like, you can even
choose 0 to give a smoother transition, but some (really
old) browsers aren’t capable of using this so I’d suggest
putting a link on that page to your new site for them.

With a meta redirect the page with the redirect issues a
200 OK status and some other mechanism moves the browser
over to the new URL. With a 200 OK on both pages, the
search engine wants to index both the start page and the
target page – and that is a known spam method (set up
10,000 domains full of keywords for the search engines to
index then meta redirect the “real visitor” after 0 or 1
seconds to the “real site” ) so using it gets you
penalized.

The 301 redirect simply issues a Permanently Moved message
in the HTTP header which tells the search engine to only
index the target URL.

Conclusion: The safest way to redirect old web pages to the
new pages or old web site to the new web site and keep the
same search engine rankings is to use the 301 redirect. It
will also pass on the page rank from your old site to your
new site.

Subscribe FREE to
Marketing Tips Newsletter

Please enter your e-mail address below to receive original in-depth Marketing Articles every 2 weeks.



NEW Ebook
101 Highly Effective Strategies to Promote Your Web Site

web site promotion strategies graphic


Hosting from $30/year


************************************************
Herman Drost is the Certified Internet Webmaster (CIW)
owner and author of Affordable Web Site Design and Web Hosting
Subscribe to his “Marketing Tips” newsletter for more original
articles at: subscribe@isitebuild.com You can read more
of his in-depth articles at: http://www.isitebuild.com/articles
************************************************

Possibly Related Posts:


Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • StumbleUpon
  • Twitter

Comments are closed.

Advertise Here
  • Popular
  • Latest
  • Comments
  • Tags
  • Subscribe
Advertise Here

Our Flickr Photos - See all photos

Blogroll

RSS Business Marketing

  • Thread Gages
    NPSM Straight Pipe Thread Plug Gages NPSM straight pipe thread plug gages are manufactured per ANSI/ASME B1.20.1. NPSM threads are designed for free fitting mechanical joints. This pipe is often used for special applications where there is no internal pressures and is often found to be more suitable to use. All straight pipe thread plug [...] […]
  • Gage Calibration Services
    CALIBRATION SERVICES Fox Valley North Metrology / Thread Check Inc is comprised of five different calibration labs: a hard gage calibration lab, a dimensional inspection lab, an electronic calibration lab, a hand tool calibration & repair lab and a field service technicians group. Fox Valley North Metrology / Thread Check Inc can develop and implement a […]
  • Power Driven Thread Gaging
    Rotary Thread Inspection Tool Patent No. 7661196 The patented Rotary Thread Inspection Tool accurately inspects internal screw threads for functional size and depth faster and easier than conventional methods. The unique Rotary Thread Inspection Tool safely checks internal threads while eliminating operator arm and hand fatigue and repetitive motion injuries […]
  • US, Japan surveys bring optimism to Asian markets
    HONG KONG (AFP) – Asian stock markets rose on Monday as investors took their cue from surveys out of the United States and Japan that show growing optimism about the state of the global economy. The strong sentiment also helped the euro to recover further ground as dealers became less risk averse. Tokyo’s Nikkei [...] […]
  • US retail sales plunge for first time in eight months
    WASHINGTON (AFP) – US retail sales slumped for the first time in eight months, the government said Friday, casting doubts on an economic recovery hinged on consumer spending. Sales unexpectedly dipped 1.2 percent to 362.5 billion dollars in May from the previous month, according to data from the Commerce [...] […]
  • Cablevision buying western cable company Bresnan
    cable television provider Bresnan Communications, a move that will help the New York cable company expand into western states. Bresnan has cable systems in Colorado, Montana, Wyoming and Utah with more than 300,000 basic subscribers. It’s owned by Providence Equity Partners. Founder and cable pioneer Bill Bresnan died last year. The deal [...] […]
  • Americans get most radiation from medical scans
    We fret about airport scanners, power lines, cell phones and even microwaves. It’s true that we get too much radiation. But it’s not from those sources — it’s from too many medical tests. Americans get the most medical radiation in the world, even more than folks in other rich countries. The [...] […]
  • Mettler Toledo’s JB Series – Legal-for-Trade Gram Scales
    Click image to view enlarged Mettler Toledo gold scales have long been a favorite with jewelers. And the JB FACT series adds even more performance. These scales automatically recalibrate themselves whenever temperature change affects weighing accuracy. The SC2002, SC3002, and SC4002 read to two decimal accuracy throughout their range, while the [...] […]
  • Mettler Toledo’s JL Series – Legal-for-Trade Gram Scales
    Click image to view enlarged Mettler Toledo brings affordability to its line of space-saving, easy-to-use, reliable, and legal-for-trade gold scales. Results are easily read on a bright backlit display. An auxiliary display can be used attached to the scale by a 19.5” cable or integrated into the design of the scale. SC602 [...] […]
  • Ohaus Adventure Pro Legal-for-Trade Scales
    Click image to view enlarged The Ohaus Adventurer Pros are made for the jeweler who needs a balance of accuracy and affordability. The SCAV53L, SCAV412L, and SCAV812L scales have enhanced parts counting capabilities, and SCAV264CL features InCal internal calibration. All gram scales measure 7.5” W x 10” D x 2.8” H and have a 5.8”x 6.3” platform. The SCAV264C […]