This site is for sale,
Learn More
Search Engine Safe HTML Page URL Redirect
Originally Published: February, 2004
Moving HTML pages on your site can be traumatic. Reorganizing and renaming pages may make your site easier to maintain and navigate but every moved page creates a bad URL. These broken URLs can cause big problems for the search engines and viewers if not handled correctly. This article shows you a search engine friendly way to
redirect URLs
for the search engine spiders and your visitors.
We will show you how to create a 301 (permanent) redirect using your .htaccess file. This article assumes that your server software is Apache and the Apache module mod_alias is installed.
[1]
The first step is to create an .htaccess file, this should be at the root level of your server. Notice the '.' (period) at the beginning of the file name, this is a UNIX naming convention, the period makes the file invisible for normal viewing. You may need to adjust your FTP client software to make this normally invisible file visible.
After you find or create your .htaccess file you need to edit it with a text editor. Depending on your URL redirection needs, you can redirect on a directory (folder) by directory basis or on a page by page basis. Here are the details for both cases:
Case 1: Redirecting The Same Page Names Moved To New Directory
If you are moving all the files in one directory to a new directory and keeping all the file names identical, then you only need 1 URL redirect statement for each directory:
Redirect permanent /old-directory http://www.your-domain.com/new-directory
Case 2: Redirecting New Page Names
You need to create a URL redirect statement for each old html page name/new html page name pair. The redirect line will look like this:
Redirect permanent /old-file-name.html http://www.your-domain.com/new-file-name.html
If you have many renamed files you may save time using the Apache mod_rewrite module and regular expressions. Details of this method are beyond the scope of this article, see
[2]
Case 3: Redirecting Full Domains
A URL with a domain name like searchenginepromotionhelp.com can be redirected to a fully qualified domain like
www.searchenginepromotionhelp.com, see
Google PR Improved With Domain Redirection
for details.
Testing The URL Redirects
After you have uploaded the revised .htaccess file to your server you can test the redirections by pasting an old URL in to your browser's address bar, if the redirections are working correctly you will end up at your new page. You should also use our
HTTP response code tester
to verify that the server is sending a 301 (permanent redirect) response code.
Once your testing confirms everything is working correctly you can delete the old files from your server.
Search Engines And The Redirected HTML Pages
If your old pages were in the search engines indexes they should be found by the search engine spider when it follows these redirects. Don't block the spiders from the old URLs using your robots.txt file, let the spiders find the redirects.
You should also create a
search engine spider map
using the new URLs, this will help the spiders find your new pages.
Search Engine Safe HTML Page URL Redirect References
[1]
http://httpd.apache.org/docs-2.0/mod/mod_alias.html
[2]
http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html
©2005 SearchEnginePromotionHelp.com, All Rights Reserved.
Site Promotion Articles Indexes:
|