OLD Redirection Policy

What is a redirect?

A redirect is a rule that tells a web browser that a page that the user has requested has moved to another location. The web browser, once it receives this instruction, will then look in the new location for the requested page. There are several methods employed to enable this process, but the most common is a list of rules that the webserver will check for each page requested. The image below demonstrates the process of a redirect:

  1. The user's machine (or client) requests a page from the website (say /oldpage)
  2. The web server receives the request and checks its list of redirect rules
  3. If none of the rules matches, the page has not been redirected and the webserver returns the page
  4. If a redirect rule is matched, the webserver returns a response to the user's machine with the new location
  5. The client machine requests the new page

If there are multiple redirects, this sequence will repeat until the server can return a page to the user's machine.

Redirects are generally split into two main types permanent (known as a 301), or temporary (known as a 302). Permanent redirects are remembered by the browser, so the browsers will automatically change one page for another without asking, however, once a permanent redirect has been sent to the browser it cannot be altered unless the user clears their browser cache. Temporary redirects are not stored by the browser, so the browser will go through the full redirect process each time the user visits that page, however, they can be changed at a later date.

It's important to note that the webserver has to evaluate all of its redirect rules every time a user visits a page, and not just that, they also have to be evaluated for every asset associated with a page individually. The more redirects we have, the slower the site will run.

How are redirects used?

We generally use redirects for one of two broad purposes: firstly, if a page, or group of pages, on the site has moved. There can be a number of reasons for this, for example, if we rename a course, or if we restructure a college we may move or remove pages on the website. A redirect, in this case, is used to send the user to the new location of that content. Secondly, we use redirects for vanity, or 'short', urls - for example, we may want the page derby.ac.uk/study/undergraduate/subject/somecourse to be available at the short URL derby.ac.uk/somecourse, in this instance we would use a redirect rule that sends users from the short URL to the full length URL.

What are the issues with redirects?

There are a couple of different types of problems with redirects, both technical and from a user experience point of view. As you can see from the image above, redirection is not a particularly efficient process, especially as we start to chain redirects, we need to make a lot of round trips to our webserver before we finally get the page that we requested, this slows the response time of the server. Also note, the server has to check its entire list of rules for every request, the more rules we have in place, the longer this process takes. This has an impact both technically, as we're increasing the load on our servers, and from a user experience point of view - particularly on mobile devices - redirection can perceptively negatively impact on the response time of our website.

 A larger issue is around user experience. Redirects, if used thoughtlessly, can cause users to be confused, or can cause the website, or our communications to appear untrustworthy. When we remove content from the website it is obvious to us what has happened as we have performed the action, so there is a tendency for us to put a redirect in place to the nearest relevant content. However, from a users point of view, they've simply ended up on the wrong page with no explanation. This will cause them frustration as they try to track down the content that they were originally looking for. Another issue crops up with vanity URLs. From time to time a vanity URL will be used to recirect to an external website. From a user's point of view this looks extremely 

How should we use redirects

Obviously, redirects are necessary, but we should have a cohesive policy to ensure that we are giving our users the best experience that we can, and so we can help them to find the content that they need to in an efficient and orderly fashion.

Vanity URLs

Vanity URLs should only ever be set as a 302 temporary redirect. They should take the user directly to the content that we intend them to link to (so no secondary redirects), and they should be named to directly reflect the content that the user is expecting to land on. Vanity URLs must not redirect directly to external websites. If a link to an external website is required, the URL should link to a page which is on the derby website with a link that will take the user to the desired external site with an explanation informing them that they are about to be directed away from derby.ac.uk.

Moved or renamed content

Content which has been moved from one section of the site to another can be redirected. This should be completed with a 302 redirect as this has no impact on SEO. This should only be done if the content itself is not significantly altered. If content has been altered - for example, if a course is amalgamated with another course, this should be treated as though the content has been removed.

Removed Content

As a general rule, content that has been removed from the site should be allowed to go to a 404 "not found" page. This informs users that the page has been removed so they can continue to look for alternative content. If a course is removed the page should be left available with an explanatory text informing the user that the course is no longer available together with links to alternate courses. Redirection without context will cause confusion and stress for our users and should be avoided at all costs.