You are here: Tech News Marketing Server Side 301 Redirects Can Help Preserve Your Site's Search Result Rankings

Server Side 301 Redirects Can Help Preserve Your Site's Search Result Rankings

Here's how to use server side 301 redirects to help search engines find your content — and preserve your search result rankings — after modifying your site architecture, menu system, changing content, or building a new site. With a little bit of pre-planning you can let search engines know that a page has permanently moved to a new page address (URL).

Business Web site owners may not know it, but a hidden part of search engine optimization (SEO) best practices is making sure that any changes to their site structure — URL changes, in particular — don't result in a loss of search result rankings.

Say you are making changes in the site menu structure by changing the names of menu items, perhaps re-categorizing various pages by moving them around to be under other sections. These changes will probably result in different URLs for those pages. After you have completed your site modifications, visitors searching for those pages in search engines will no doubt retrieve cached versions of them linking to the old URLs. The result: a "404 page not found" error for the visitor. The other possible result: the chance of a loss of your search results ranking in future searches. Search engines will, over time, re-index your site's pages, but as to whether your search engine rankings will improve or get worse after re-indexing, one cannot be sure. However, you can do your best to help search engines to connect the old content with the new location of it — or a new or substitute version — by using server side 301 redirects.

Server side 301 redirects are an important feature allowing you to tell search engines where your content was moved to. All you have to do is to visit your old site before you take it offline and copy all of the old URLs for pages whose locations will change. Then by using an .htaccess file containing the old and new URLs, you can provide directions telling search engines where to find the new page.

How to Setup 301 Redirects:

This applies only to servers running Linux, Apache, MySQL, and PHP (LAMP).

1. Check with your hosting provider to make sure they have activated htaccess for your domain.

2. Using a text editor create a new text file (.txt) and type in the following:

Redirect 301

3. Insert a space character and then on the same line, type in your first old URL, leaving out everything after the domain suffix. (Delete "")

4. Still on the same line, type in another space character and paste in the full new URL of that page, including "".

5. Create a new line in similar fashion for each page of your site you wish to redirect.

6. Save this page as "htaccess.txt" on your local hard drive.

7. Login to your site server via FTP, or through your hosting control panel's file manager.

8. Upload the htaccess.txt file to the public web directory of your site and rename it to (include the period at the beginning):



Redirect 301 /oldpage.html
Redirect 301 /old_subdirectory/oldpage2.html
Redirect 301 /old_subdirectory2/oldpage3.html

In the above, the first URL is the old URL relative to the public web space for your domain, followed by a single space, followed by the second URL which is the new one it is being redirected to.

Search engines will read this file and permanently modify their indexed record for each page, noting the new location(s).

Remember that the htaccess.txt file must be a plain text file. Use a plain text editor application such as Notepad on Windows PCs or BBEdit/Text Wrangler on Macs.

Joomla Templates and Joomla Extensions by JoomlaVision.Com
More in this category: Next »
Login to post comments

Services Quick Links


Azurelink serves clients from all over the U.S. Our home office is in the rural farming town of Townsend, Massachusetts.

249 Wallace Hill Rd
Townsend, MA 01469

Contact Us

Clients, for technical support issues please login and submit a trouble ticket.
1 + 5 =