301 Redirecting your old Website Pages to your new WordPress Website


 

New Site – New Server – New Pages -New URL’s?

“How to move your site without loosing your search engine ranking and incoming links”

This brief “How-to” assumes that you currently have a website and you are planning (or have already) build a new website using a different domain name and/or different page names.

Here is a great article written by Google which provides more insights on the importance on the steps outlined below. http://googlewebmastercentral.blogspot.com/2012/04/how-to-move-your-content-to-new.html

You will need an FTP client or access to a “Filemanager” which is in most cases provided by your hosting provider. The goal is identify your most important pages and redirect vistors, search engines and incoming links to your new website and/or pages. If you just want to know how to “301 Redirect” jump immediately to Step2.

 

Step 1. Check Inbound links and Page ranks of your current website pages

If you don’t already use Firefox then now is the time to get it, because we will use a free Add-on (link below) to check your current website stats. Download Firefox here.

After you successfully installed Firefox; download and install the free “SEO for Firefox” Add-on. This tool was designed to add more data to Google and Yahoo search results to make it easier to evaluate the value and competitive nature of your (and other) websites.

Download the Firefox SEO Tool here. Easy to follow Instructions on how to configure the Tool are available at the download link.

 

Let’s Go!

With Firefox running and the SEO Add-on activated type your website name into Google.

SEO Add-on Results

For this project we are primarily interested in your websites pagerank and incoming links – which are highlighted in the image above. (Note: all other data points have been turned off for simplicity)

What’s all the fuzz about Pagerank? –Read the Wikipedia article.

 

A closer look at your Incoming Links

Incoming links are a crucial part of your search rankings and success of your web page. For a closer investigation of your incoming links type your URL into Yahoo’s Site Explorer [Update 03.19.12] Yahoo Site Explorer shut down. We suggest http://www.opensiteexplorer.org.

The Screenshot below shows the Yahoo Site Explorer results:

Click on the “Explore” button on the right of your desired page URL:

Click the “Inlinks” button and make your selection on what links to show:

If you have a large quantity of pages (and little time) you can now make your decision about which pages you want to create a 301 redirect for in your htaccess file. If time is not a problem then it won’t hurt to redirect all your old pages to the appropriate new ones. You can redirect multiple old pages to one new page.

 

Step 2. Redirecting your old URL’s by using an 301 in your htaccess file

UPDATE: here is a great plug-in that will (likely) take care of everything!

An .htaccess file is a directory-level configuration file that allows for decentralized management of web server configuration. The file can be created and edited with a text editor like NotePad, SimpleText or TextWrangler.

If you are using WordPress you will very likely already have an .htaccess file in the root of your hosting server.

If you do have one, use the existing file, make sure that you do not delete any entries that may have been created by WordPress or any other programs that you might be running on your server.

The Screenshot below shows a standard .htaccess entry that was automatically created by WordPress:

 

I don’t have an .htaccess file – How can I create one?

Open up a text editor and save an empty page as .htaccess Note: If you are working with a Notepad you might be forced to use .txt file extension. Simply right click the file name after the creation and remove .txt

Important 1: .htaccess is the file extension. It is not file.htaccess or somepage.htaccess, it is simply named .htaccess

Important 2: The .htaccess file must be uploaded to your old server – not the new one.

 

Editing an existing .htacces file

To edit an existing file simply download the htaccess file and open it with a text editor of choice (do not use Microsoft Word it will add hidden text formatting to the file). Remember: do not delete any entries that may have been created by WordPress or any other programs that you might be running on your server. Add your new entries below the existing ones.

 

Let’s Redirect a Page

For this How-to Guide we will redirect the following URL: http://www.savenergycanada.ca/faq.php

To a fictional new one called: http://www.enersave.com/questions

Here is the code snippet to add to your .htaccess file:

(Notice: there is no “http://” or “www” in front of the old URL)

Repeat the step above for all additional pages you want to redirect.

The generic redirect code snippet looks like this:

Make sure to paste the redirect code ABOVE the WordPress code in your htaccess file.

 

Redirecting your entire Site the quick and “dirty” way

Here is a code snippet that will catch any traffic on your old site and redirect it to your home (index) page on your new server. If you want to redirect each page to its new page counter part (the suggested way of doing it), use the code above.

Code Snippet:

 

Redirecting a Database driven Website

(the instructions below are from tamingthebeast.net)

A dynamic page is one generated by a database driven application, such as blog or forum software. A file name is appended by a query string, looking something like this:

http://www.example.com/page.php?id=13

Where a query string is used, the 301 redirect solution for static pages above will not work; you’ll need to use a rewrite solution.

Using the page.php?id=13 example, here’s what you’ll need to use in your htaccess file:

 

RewriteEngine on

RewriteCond %{QUERY_STRING} ^id=13$

RewriteRule ^/page.php$ http://www.example.com/newname.htm? [L,R=301]

 

In the example above the id=13 should be replaced with thequery string of the page you wish to redirect and the page.php with the nameof your file prior to the query string.

Or you can redirect all pages to the according new ones if the names match.

For example “painmanagementsanfrancisco.com/about” to “sanfranciscochro.net/about” like this:

 

# Redirect to sanfranciscochiro

<IfModule mod_rewrite.c>

# For security reasons, Option followsymlinks cannot be overridden.

# Options +FollowSymLinks

Options +SymLinksIfOwnerMatch

RewriteEngine on

RewriteCond %{HTTP_HOST} ^painmanagementsanfrancisco.com [OR]

RewriteCond %{HTTP_HOST} ^www.painmanagementsanfrancisco.com [NC]

RewriteRule ^(.*)$ http://www.sanfranciscochiro.net/$1 [L,R=301]

</IfModule>

# Redirect to sanfranciscochro end

 

Additional Reading: apache mod_rewrite module.

Even More Details can be found here: Digitalpoint