Feb 17 2009
Use The 301 Redirect To Avoid Broken Links and Google’s Wrath

A 301 Redirect Prevents Lost Visitors
You’ll eventually find it necessary to move or rename a web page.
However, old, out-of-date URLs will remain in your readers’ bookmarks and favorites, in other web sites’ links, in email sig files – in all sorts of places you cannot control.
When a customer who hasn’t visited your site in many months uses an old, out-dated link, they get a “404 File Not Found” error and the sale is lost.
Just as bad, Google has the old URL squirreled away in its vast memory – and you suddenly find a once busy site penalized or delisted because the link leads nowhere – even if all you did was change the htm extension to html!
You can avoid this problem with a simple bit of code called a 301 Redirect.
In the past, webmasters used metatag redirects or javascript redirects to send readers or buyers to a page other than the one whose address they’d typed into the browser address bar. Today, this practice is seen as inherently deceptive because it is used and abused by spammers and crooks.
To stay on the side of the angels – and on Google’s good side – use the 301 Redirect in a file called .htaccess
Here’s how:
If your website is hosted on a server running Linux or Apache, you probably already have an .htaccess file in the root directory. Use your favorite FTP program to download the .htaccess file to your own computer. (If necessary, you can also create a new .htaccess file by just opening NotePad and writing out the redirect command and then naming the new file .htaccess NOTE: do not use the .txt extension)
Before you make any changes to an existing .htaccess, be sure to create a back up copy. If anything goes wrong, you’ll want to revert to the original file, and the simplest way to do that is to just upload it again.
Open .htaccess in Notepad and add this simple command:
Redirect 301 /original/original.html http://www.yournewURL.com/new.html
Save the changes, being sure to change the File Type to “All Files” so that NotePad doesn’t add a .txt to the end of the file name. It must remain .htaccess
A few things to note:
- There is no “http://” or “www.” in front of that first URL.
- There is a single space between parts of the command: Redirect [space] 301 [space] old URL [space] new URL
At first glance, this may seem like arcane mumbo-jumbo. But it is really straight forward and not at all hard to do. A little time spent experimenting will be more than repaid in improved SEO.
A 301 Redirect can be also be very useful in other ways. You may, for instance, want to give shoppers an easy way to find your eBay store. Rather than hoping they’ll recall a complicated eBay URL, just send them to YourStore.com/ebay/ and use the 301 Redirect command in .htaccess to permanently send that URL to your eBay store.
If you’d like to learn more, Steven Hargrove has many scripts and detailed directions on his site.
Photo by by Number Six (bill lapp) Released under Creative Commons License
Similar Posts:
- Useful Snippets of Code
- How To Build A Web Site For Your Business – Part 1
- 12 Tips For Moving Your Web Site
Print This Post
No responses yet

Follow Me on Twitter