Redirects

Redirects is the name given when a user lands on one page but you want them to be taken to another automatically.

This may happen when a user has an old link to a page that has been removed (a so-called 301 or "permanent" redirect as the old page is gone, and Google will replace the old URL in it's database with the new destination)... or you may temporarily want to point the user to another location while you make a correction (a so-called 302 or "temporary" redirect where Google remembers the old URL)

From a user perspective, both 301 and 302 redirects do the same thing (they are forwarded to a new page), but the cirtical difference is that Google treats the two differently.

301 Redirects: Permanent. Google should remember the new page URL

302 Redirects: Temporary. Google should remember the original page URL

(More detailed information on wikipedia...)

Creating a Redirect

You can create a redirect in two ways on the Server platform. There are two main scenarios:

  1. The quick fix (ex. a newsletter just went out with the wrong URL)
  2. Permanent page move (ex. you just release a new version of the site)

The Quick Fix

This can be a very useful tool in EpiServer but it should be used carefully as it's easy to forget about these links.

Have you been to www.gwp.org/database? How about www.gwp.org/vote? Neither of these lives on our website, but we redirect the user to the destination by creating a dummy page on www.gwp.org and then redirecting them to a new location.

Permanent Redirection

Premanent redirection is a very important part of launching a new site or moving site sections to new locations.

When you create a new site design you should collect all the inbound links and create a spreadsheet with three columns:

  1. Inbound URL
  2. Destination URL
  3. Redirect Type

Sort the Inbound URL alphabetically and remove dulpications, and highlight those URLs that contain vital information (ex. PDF documents) or link to key pages (ex. news, the homepage, contact information, a document library).

For these highlighted URLs make sure there is a new place for this information to live on your new site. Once you have created the new destination for this content, enter the URL in columns 2. This will tell the website where to send the visitor when they request the page/document through the old URL.

Redirect Type should always be 302 unless you may change this location in the future.

Next, remove the http:// and domain parts from both columns. make sure each URL starts with a /

Example...

www.gwp.com/old-page-technical-commitee www.gwp.com/new-tech-page 302

Becomes...

/old-page-technical-committee /new-tech-page 302

The resulting spreadsheet should then be sent to gwp admin to add to the redirects.csv file at the site root (teh admin will check for duplications, conflicts and especially loops - which are where a redirection is being redirected to it'self, which would crash the site...)

Example of a Loop

Old Page  Redirected Page

A              B

B              A

As you can see a user trying to get to page A would be sent to B, and then sent back to A again (and B then A then B then A etc....)

This would make the site send the user in an infinate loop, which would crash the site.

If the site is running very slowly, or not responding, the redirect.csv file should be checked immediately.