How to Implement A 301 Redirect for Good SEO

A 301 redirect is mainly meant to tell search engines that a page has been moved permanently, and it should index the page that’s replaced the old one. Think of it has a change of address of your office. If a 301 redirect is done correctly, it will ensure that you don’t lose SEO juice. So, there will be no decline in ranking and obviously, traffic. It also helps prevent duplicate content which can cause a conflict with a previous version of the website.

How to Implement A 301 Redirect for Good SEO by Scope DesignWhen is it a good idea to implement a 301 Redirect?

Here are a few reasons to implement a 301 Redirect:

  • You are reorganizing pages by removing and adding new directories
  • The entire root domain is being changed
  • You want to use a vanity URL and not lose SEO juice

Redirecting via the .htaccess in Apache

Editing the .htaccess files require that you have access to the Apache configuration file and the server. The config file will need to have the “Allow Override” command to allow any edits to the .htaccess file. If you don’t have access, we suggest that you call the hosting company.

After it has become apparent that you do have access you need to locate the file. Usually, the .htaccess file resides in the root web folder of the website. If you don’t see one in the root folder, then create a .htaccess file.

The important thing to note is that the (.) dot, in the name (htaccess) means it is hidden, so you need to enable the FTP software’s ability to view hidden files.

Don’t use notepad to edit the file but rather an HTML editor or software like TextPad should work. Then add the following line to the file:

To Redirect a Page:

RedirectPermanent  /current-page.html http://www.presentdomain.com/new-page.html

To Redirect the domain:

RedirectPermanent / http://www.the-new-domain.com/

Make sure that there is a blank space at the end of every file. A blank line is seen as an “endline” character by the server.

Implementing a 301 Redirect on a Microsoft Windows Server via IIS

Go to the Administrative Tools and then IIS Manager from the Start Menu. The panel will list all the sites. Then choose a website you want to edit. You’ll see many different modules pop-up. Make sure that the ‘URL Rewrite’ module is listed.

Double click on the module, you’ll see an “Add Rules” option open up. Click that and choose “Blank Rule” under the option marked “Inbound Rules.” Then click “OK,” and it will take you to the “Edit Inbound Rules” screen. You can type a rule to identify it like “Old Page 301 Redirect.”

Click on the “Match URL” panel, and then set the URL to “Matches the Pattern,” and also “Using as Regular Expressions.” You’ll also need to specify if you are redirecting an entire domain, a group of pages or just one page in the following manner:

  • Redirecting a single page just requires typing in its page number on the “pattern” box.
  • Redirecting an entire website would require that you add a (.*) in the pattern box.
  • To redirect all pages on a domain within a specific folder you’ll put foldername/(.*)

Note: The “ignore case” option should be checked.

Head on down and choose Redirect on the action panel. In the properties, type in the redirected URL. If it’s just one page, input that page’s URL. If it’s the whole domain or maybe a group of pages, type the new location along with {R:0}.  So, if for instance if you were redirecting abc.com to xyz.com, you’d put zyz.com/{R:0}.

In the type of redirect field choose “301”. Then click “Apply.”