How To Apply Page Level 301 Redirects In Apache Web Servers

301 Redirects Minimize Lost Traffic from Web Pages That Are Moved or Deleted

If you delete or move web pages that are indexed in search engines you can lose targeted traffic for weeks or months unless you apply a 301 redirect. 

Lost visitors from Search Engines
The listing for the page will often continue to appear in search engine results for some time after it has been moved or deleted. When people try to click through to the page they’ll receive a “page not found” error. Many of these people will give up and go back to the search listings to find another result (This is especially true if you do not have an effective “page not found” error page. See the “For More Info” section at the end of this article for more on this).

Lost visitors and Link Juice from other Referral Sites
The same result happens if other web sites link to a page that you move or delete.  This results in a broken link on the other web site. Again, when people try to click through to the page they’ll receive a “page not found” error. Unfortunately, links on other web sites can stay up for months or years before anyone notices the bad link. In the meantime you’ll be losing targeted traffic (as well as most of any “link juice” the link may have contributed in the past to your page’s search positions).

Apply a 301 Redirect
You can apply a 301 redirect to the old page right after you move or delete it.  It will automatically redirect people (and search engines) to another page. This is called a Page Level Redirect (as opposed to a Server redirect which is often used to redirect traffic from one domain name to another domain name)

In this article Bruce Borner, of Computer Projections, explains how to apply a page level 301 redirect on Apache.


How to Apply 301 Page Level Redirects in Apache 2

(Note – These instructions are specific to Apache 2 / FreeBSD)

The 301 redirect is achieved by the inclusion of an .htaccess  file saved in the root directory of your web site.  The use of .htaccess is not limited to 301 redirects and so may in fact already exist in the site root.

To begin with you’ll need write/modify access to the site root.  

Editing .htaccess

If the .htaccess file already exists and you’d like to keep whatever is already in it, you’ll need to edit the file.

You will need an FTP program with a text editor.  WinScp is a very popular FTP tool and is available as open source from 

Using the login feature of your FTP program, log in to your host , navigate to the site root directory and find and highlight the .htaccess file.    Click on the text editor tool to bring up the contents of the .htaccess file in the editor.

Alternatively you can copy the .htaccess file down to your local drive and use an editor such as notepad to add the 301 redirects to the file.  Once you’re done just remember to copy the file back to the root directory of your website.

Creating .htaccess

If you don’t currently have an .htaccess file in your website’s root directory you will need to create it.  Creating a new file which will be your  .htaccess text file  is as simple as opening up notepad.exe on your local computer and saving a blank file temporarily to your harddrive as .htaccess.   

Once you’ve added your redirect instructions you will need to save the file and copy it up to the root directory of your website.   Once done make sure your attributes for the file are set to 644 (Read on Owner, Group and World and Write on Owner).

Add 301 Redirect Statements

If you are editing an existing .htaccess file then start on the first open line in the file.   If you are creating a new file , then start at the top corner of the empty file.

Type the following:

redirect 301

Next you’ll add the arguments for the URL you’d like redirected as well as the URL to which it should be redirected.

Let’s assume you’re redesigning your website.  Previously your ‘about us’ page was named about.html and it was located in your site root.  In your redesigned site you have named your ‘about us’ page about-us.html instead of about.html and you’ve located it in a folder titled about-us.  

The first argument identifies the relative (from root) URL you would like to have redirected.

In our example this would be /about.html  (or the URL that is to be redirected)

With the first argument our line of text would read:

redirect 301  /about.html

Now we need to add the second argument which provides the fully qualified URL to which the first argument is redirected or

redirect 301  /about.html

Notice that the second argument takes the full http:// specification.

Add as many 301 redirects as you like within the .htaccess file.


E. Bruce Borner is President of Computer Projections, Inc a Technology Management Consulting company in New York, NY


For More Information 

The Importance of an Effective Custom “Page not found” (404) Error Page

SEO Site Review & Phone Consultation
Only $700 in June


A SEO review & phone consultation includes:


  • SEO Expert George Aspland will review your web site and the pages from it that are indexed in some major search engines. 

  • In a one hour phone call, using Screen Share technology George will show you any important issues that are reducing search engine traffic and make suggestions should help improve your search engine results.

A SEO Review & Phone Consultation normally costs $900.

There are only a few slots available for SEO Review & Phone Consultations at $700 in June so Contact Us soon

Contact Us Now to
Reserve Your SEO Review & Phone Consultation