Redirect Tool

Follow

Overview

The redirect tool is a valuable feature that enables you to keep links to content within your site up-to-date with your readers and the various search engines. It is most useful in situations where content has been moved.

For general information about redirects and URL specifications, we also have the following support document: 301, 302, and Canonical URL Differences. When you change the name of a section, for example, Metro Publisher automatically adds a 301 redirect; there is no need to use the redirect tool. A canonical URL on the other hand, is a hint for search engines indicating a preferred URL you specify, and therefore not a redirect.

 

NOTE: There is an "External URL" field on your Metro Publisher edit pages for sections and subsections. That field is there in case you want a navigation element to send readers somewhere else, i.e. your homepage, a Topics page, a Pages page, a location search, an event search, or even another website. You should NOT use the Redirect Tool for those purposes.

 

To find the redirect tool, log in to your Metro Publisher work site as Admin. On the right side of the start page there is a link labeled "Redirects."

 

mceclip2.png

 

You can also reach the Redirect Tool via Admin > Settings > Redirects

 

mceclip0.png

 

Important things to know:

1. Redirects only come into effect when Metro Publisher can't find any other page for the URL to fulfill the request.

  • Example:

    You cannot create a redirect to point your readers away from a published article.

    Reason: safety – This prevents the possibility creating all sorts of overlapping redirects that are very difficult to debug.

    Therefore, the page you want to redirect from cannot be live in order for the redirect to work - it has to be changed to the "draft" state.

2. Redirects are applied in the order they appear on the redirects overview table.

  • Example:

    The first redirect that matches gets used.

    Reason: If there are multiple redirects that effect the same URL, the one at the top of the table gets used first.

NOTE: Metro Publisher has a powerful automatic 301 redirect tool for changes to your Content URLs, should you choose to alter URL names. Locations, however, have their own special directory in Metro Publisher and should be redirected manually via the Redirect Tool for now.

Due to URL history information and the way Google indexes URLs, an extra slash is needed on the origin URL for the redirect to work. Please note that from MP v4.0, changes to Location URLs will also be automatically redirected.

Follow this format to redirect Locations in the Redirect Center:

Original path: /locations/original-location-url-name/

Target path: /locations/new-location-url-name

 

Examples

Here are some popular scenarios for using redirects.

Relaunch of Seasoned Site

  1. Directing traffic from popular URLs on your old website to new URLs on your new website:

    If you have an existing website, there are most likely a certain number of specific links that get a lot of traffic. When you rebuild a website, with any system, the new website will most likely NOT have the exact same structure as the previous one. This is true for a few reasons: you may decide to reorganize your content and/or the new content management system has a different way of organizing your site and, thus, the way the URLs appear for your content. In order to prevent the loss of those popular links when you relaunch your site, you should use the redirect tool.

    As an example, let's say that you have a very popular article about the Hatfield and McCoys which on your old site has a URL like this:

    http://mywebsite.com/sections/local-history/hatfield-mccoy.html

    On your new Metro Publisher site you have recreated that article but, because URLs are generated in a different way, the web address is no longer exactly the same:

    http://mywebsite.com/local-history/hatfield-mccoy/

    In order to ensure your readers who have bookmarked the old URL and the search engines that have indexed the old URL will still be directed to the proper page, you need to create a redirect from the old article to the new one.

    Please DO NOT include the URL of your domain name in the redirect command fields, i.e. remove the http://mywebsite.com part, so that you are left with /sections/local-history/hatfield-mccoy.html redirecting to /local-history/hatfield-mccoy/ as in the example above and as shown in the image below.



    Above you'll see that the old path is now pointing to the new one. Once your site has launched, readers who go to the old URL will automatically be bounced over to the new one.

  2. Directing traffic from sections within your old website to new ones on your new website:

    This second example also involves a seasoned website that is being relaunched using Metro Publisher. In this case, we have already created the redirect for the popular Hatfield and McCoy article. Now you want to make sure that anyone who goes to ANY piece of content in the section entitled "Local History" on the old site gets redirected to the new URL for that same section on the new website.

    So, in this case, the old URL for the Local History section looks like this:

    http://mywebsite.com/sections/local-history

    And the new URL on your Metro Publisher website looks like this:

    http://mywebsite.com/local-history

    In order to ensure that your readers, who may have bookmarked any one of your articles in the old section, do not get a "404 – Page Not Found" error, you will also want to create a redirect.

    Please DO NOT include the URL of your domain name in the redirect command fields, i.e. remove the http://mywebsite.com part, so that you are left with /sections/local-history/** redirecting to /local-history for the example above and as shown in the image below.



    In this example, you simply want to make sure that if someone types in the URL for any other articles within the old section, that at least they get sent to the new section page. This is much better than having them sent to a 404 page. To do this, you need to input the path to the old section, then add /** to the end of the path to signify that ANYTHING within that section will be sent to the new section.

    Remember, the order of these redirects is important. So with these two examples, you need to make sure that the redirect for the Hatfield and McCoy article comes BEFORE this blanket redirect of all URLs within that old section. 



    Before you finish, make sure to check the overview table of your redirects and put them in order of priority. 

Short URLs

  • Short URLs are redirects is in a situation where you want users to see a very simple URL that is easier to remember but the real URL is very long and/or complex. This is useful when you use a web address in a the printed magazine.



    In this example, the much shorter and easier to remember address:

    http://mywebsite.com/contest

    Will take readers to the real URL here:

    http://mywebsite.com/offers/2014-pet-photo-contest.html

    Please DO NOT include the URL of your domain name in the redirect command fields, i.e. remove the http://mywebsite.com part, so that you are left with /contest redirecting to /offers/2014-pet-photo-contest.html for the example above and as shown in the image below.

Advanced Features

WARNING: Simple pattern matching and substitutions require an advanced degree of knowledge regarding redirects. If you choose to use this feature, proceed with caution. You can really create havoc on your website if you are not careful.

 

Simple Pattern Matching and Substitutions

The pattern matching system is a simplified version of regular expressions or "globbing." If you are comfortable with either of these concepts, then you will be able to use this advanced feature with relative ease. If you are not, then it is advisable to either refrain from using it or get some help.

Pattern Matching Rules

  • Single star (*) matches everything except for / in the path and in the query string matches everything except for "=" and "&"
  • Double star (**) matches everything and can only come at the end
  • First pattern to match wins.

Substitution Rules

  • The destination URL is constructed by a template where \N is used for substitutions in the result (N is the number of the match you are targeting).

Example 1: pattern = '/foo/*/bar' and template is '/gee/\1/whiz'

   You get these results:

           /foo/1/bar -> /gee/1/whiz
           /foo/42/bar -> /gee/42/whiz
           /foo/fi/bar -> /gee/fi/whiz

   But this does not match:

           /foo/fi/bar/boo

Example 2: pattern = '/foo/**' and template is '/gee/\1/whiz'

   You get these results:

           /foo/1/bar -> /gee/1/bar/whiz
           /foo/42 -> /gee/42/whiz
           /foo/1/2/3/4 -> /gee/1/2/3/4/whiz

 

 

 

 

 

 



Have more questions? Submit a request

Comments

Powered by Zendesk