Redirecting web visitors to another web address

You can add a 'Redirect' content type to any section.
This will place a piece of JavaScript code onto the webpage that this section publishes.
Once published, this code runs as soon as someone browses to your page, making their browser automatically go to a completely different web page. 

Why you might want to use a Redirect

Example 1 - Wrong address published

The 'Redirect' content type is especially useful if the wrong web address was published somewhere.
For example, if an email went out, saying 'For more information, visit www.universityofgalway.ie/coa/' but that link should have ended with '/cao/', everyone following the link would encounter a '404 - Page Not Found' error.

If, for some reason, you could not simply send a correction email, the next best way to resolve this problem would be to:

  1. Create the (currently non-existent) page that the email is linking to (www.universityofgalway.ie/coa).
    (You'd do this by creating a new sub-section of 'University of Galway' and entering the value coa into its 'Output URI' field)
  2. Add a redirect type into this new sub-section.
    • Give it a name, such as 'Redirect to CAO page', so that future CMS editors will understand what this content does without having to open it.
    • Enter the web address that you want the page visitor to be automatically brought to.
      In this example's case, you'd enter htttps://www.universityofgalway.ie/cao/
    • Save and approve

Now that the section contains some approved content, it will publish to the web server whenever the next scheduled publish runs.  Scheduled publshes normally begin at the stroke of every hour, so by half past the hour, your new /coa page should be live on the University website.

From that point forward, whenever anyone clicks on the email's link, they will no longer encounter a '404 - Page not found' error.  Instead, your new webpage will load for them.  As soon as this web-page loads, its Redirect will kick in and the visitor's browser will automatically go to the correct webpage (universityofgalway.ie/cao).

Example 2 - Shortcuts

Redirects were employed to create short web addresses for courses.
For example, a section was created that publishes to www.universityofgalway.ie/gy101 - it contains a Redirect to the longer web address https://www.universityofgalway.ie/courses/undergraduate-courses/arts.html, making it far easier for prospective students to browse to the course page they are interested in.
This technique was used to create shortcuts to all undergraduate courses, using their CAO codes.

Instructions: How to Add a Redirect to a page

  1. Edit the section you want to add the redirect to.
  2. Add a 'Redirect' content type to this section.
    (It doesn't matter if there is other content in this section already - the Redirect will still work)
    1. Give it a descriptive name.  E.g. 'Redirect to UG Courses Page'
    2. Enter the full web address of the page you want to automatically bring the user to, whenever they load this page.
      E.g. https://www.universityofgalway.ie/courses/
    3. 'Save and approve'
  3. 'Save Changes' and then wait for the webpage, that your modified section controls, to publish.
    This will usually be completed by half past the next hour (so if you do this at 15:04, the modified webpage usually will be live by 16:30)

Example

Below is a link to an example of a Redirect in action.  This link goes to the page www.universityofgalway.ie/t4/examples/redirect/example/ but as soon as it loads, it will Redirect you back to this page (which will auto-scroll to the Extra Information you probably haven't read yet).

 

Things you need to know about Redirects

Redirects always work ...

It's possible to have other content on a page that contains a Redirect content type.
However, it will not disrupt the redirect from happening.  The page (with all its content) will load, and once it has finished loading, the redirection code will kick in, instructing the visitor's browser to immediately go to another page entirely.
This happens so quickly, you won't get a chance to read the content that was on the page.

... Unless JavaScript is disabled

If you are using a browser that disables JavaScript, the Redirect will not work.  All common browsers execute JavaScript (JS) code automatically, which is why Redirects work for all visitors - but it's possible to tell that browser not to run JS, in which case, you'd be able to read all the content on the page because the browser will ignore the instruction to go to another web address.

While it is very rare for a person to use a browser that ignores JS, there are some things that ALWAYS ignore JS - Search Engines. 

Redirecting users away from out-of-date content

If you decide the content on a page is out of date, and you'd prefer your visitors to go to another page, where there is more up-to-date info, you may decide to add a Redirect to your page because this will automatically move your page visitors on to the authoritative webpage.

This approach will work perfectly for humans browsing your site - but search engines will still see the text that is on your page (that the humans won't get a chance to see, before the Redirect kicks in and another page loads). And these search engines will happily regurgitate the out-of-date info they read on your page.
This is becoming more of a problem with the rise in popularity of AI searches, which try to give you the answer to your question without you needing to click on any of your search results.  It's also affects the quality of information people may receive via voice searches.

E.g. 'Hey Siri, How much does a degree in arts cost in Galway?'
'Alexa, what's the closing date for applications for Arts in the University of Galway?'

So, if you are using a Redirect on a page, it is best to delete (or expire) the rest of the content on the page, so that your old content doesn't get reported to someone as fact.