Redirecting Your Old Pages to Your New Pages

If search engines have indexed a page in your website and the URL for the page changes, you need to consider setting up redirects from the old URL to the new URL. There are two main situations where redirects might be required:

Website Migration: If you are migrating from an existing web site to a new domain, you can redirect your old pages to their new location. For example, your old www.mydomain.com/AboutUs.htm page may now be located at mydomain.com/about-us/.

Website Amendments: If you are rearranging pages in your website, you can change the URL for a page by amending the permalink for the page, or by changing the Page Parent. For example, your page mydomain.com/about-us/ might be changed to mydomain.com/about/ (a change of permalink) or mydomain.com/contact/about-us/ (a change of parent).

Redirects mean that when anyone requests a page address from your old website, they are redirected to the new page. If a 301 redirect is encountered by a search engine, the search engine might take note that the page is now located at another location. Over time, search engines might then update their records to reflect the new location of the page.

Using redirects (301 redirects if you need the technical name) is the best way to help Google and other search engines know what has happened when you move pages, and therefore help to preserve the ‘search engine equity’ you have have earned.

Planning

These redirects are typically set up when you first migrate your existing web site to your new OM4 web site. With planning you can set up redirects in advance so that your cutover goes smoothly with no ’404s’ (a 404 is the error code returned when a requested page is not found).

Finding indexed pages

To find out which pages on your website Google currently knows about, visit Google and do a search for the following:
site:mydomain.com
ie site: followed by your domain name (all one word – no spaces).

Note: If you see an option (bottom of the page) to repeat the search with the omitted results included, do so. This ensures that all indexed pages/files are shown.

Setting up permanent redirects

To set up permanent redirects for these old pages, log into your new site’s Dashboard, then click on the Plugins menu. If the Redirection plugin isn’t already activated, then activate it.

Then click on Domains, then Page Redirection.

Return to your Google search results page, then click on the first result for your previous search (http://www.mydomain.com/AboutUs.htm in our example). If the page returns a File Not Found error, then a redirect needs to be added.

Copy the URL of the page that has the error, then return to the Page Redirection screen, and paste it in the Source URL field.

Then find out the URL for where this old page should redirect to (http://www.mydomain.com/about-us/ in our example).

Make sure the type is Simple redirection and the method is 301 Permanent redirect, then click the Add Redirection button.

The redirect should then appear in the redirections list at the top of the screen.

Catch all redirects and wildcards – Advanced

In some situations you might want to add a catch all redirect that affects a group of indexed pages. You need to use a regular expression in the redirect (and these are very complex to understand) AND you need to make sure the catch all statement is the last redirect in the list of redirects.
Here is an example of a catch all expression that redirects any pages ending in .htm or .php to the home page – because it appears last, any more specific redirects will always fire before this:
Title: Generic catch-all (always needs to be at bottom)
Source URL: /(.*)+\.(htm|php)$
Target URL: /

Other examples of catch all redirects:

Source URL: ^/shop/product\.php\?productid=([0-9])*
Target URL: /
This will match all URLs in the form /shop/product.php?productid=xyz (where xyz is any number), and redirect them to the home page.

Checking your redirects

Return to your Google search results, then click on the first result again (http://www.mydomain.com/AboutUs.htm in our example). Instead of receiving a File Not Found Error, you should be automatically redirected to the new page (http://www.mydomain.com/about-us/ in our example).

For all other entries in the Google search results that return a File Not Found error, add an appropriate redirect.

Once you’re done, all the old pages indexed by Google should redirect to their new URL.

Over time, Google will discover these redirects and will replace the old (incorrect) URLs with the new URLs. It can take some time to complete, it depends on how frequently the search engines spider your site.