singledigitalpresence.vic.gov.au

Aliases and redirects

How to add redirects (including short/vanity URLs) and when to change a page's alias.

Aliases

Aliases are the URLs assigned to nodes (pages) when they are saved. 

Nodes always have a number associated with them. When you create a page and save it for the first time, it is given a URL alias that is a hyphenated version of the page title (with short words like ‘the’ and ‘and’ removed). 

When to use aliases 

When we change a page title, we should manually change the alias to match it, for good SEO.

When we do this, all internal links (ie links on CMS pages; not external sites) to the node/page won’t get broken, because they’re still tracking the node number.

Only update the alias – don't delete it. If the alias is deleted, then it will mean the page isn't discoverable within the CMS or externally.

Redirects from external sites to SDP pages

These are usually used when a site or page is migrated from another CMS to the SDP CMS. Redirects on external sites must be made by the administrator of that site.

A spreadsheet should be prepared listing the old site pages and the SDP CMS URL. SDP URLs should be in the following format: /site-#/page-url (example: /site-4/contact).

This spreadsheet should be provided to the site administrator of the external site, to implement on the day of the site going live on SDP. It should also be provided to the SDP team for testing.

Redirects from and to pages in the CMS

We use redirects on pages within the CMS for a couple of purposes:

  • when there's a need for a shorter version of the URL for use in advertising and social media
  • when a page has changed its title and alias, and we want all users to still be able to find it (e.g. when the older URL was used in social media or on another site, or users may have bookmarked it)

Create a redirect for a short URL

To add a redirect for a short URL:

  1. Go to the redirects screen and click Add redirect. (To find this screen, roll over Configuration, then on the dropdown menu roll over Search and metadata, then click on URL redirects.) 
  2. All pages have a site code (e.g. vic.gov.au is site-4). You'll see it in a page's URL path when you're in the CMS.
  3. In the Path field, type in the site code and the short URL you want to redirect from.
  4. In the To field, start typing the page title and select your chosen destination page from the dropdown that appears.
  5. Click Save and test it on the live site.

Example:

  • From (Path): /site-507/covidsafe-summer (a short URL to use in advertising)
  • To: /site-507/together-we-can-keep-our-summer-covidsafe (the node/page alias that matches the page title; the part after /site-507/ displays on the live URL). 

Why not use an alias?

In the SDP CMS, you can create a short alias for a page with a longer URL. We prefer to use the redirect method rather than the alias method for a couple of reasons:

  • WIth the alias method, when a user visits this link, the URL displayed in the browser will be the short one. For SEO reasons, we prefer the URL of our pages to match the full page title. 
  • Using an alias instead of a redirect will also split your Google Analytics results – you'll get 2 sets of numbers for the one page, which would give misleading traffic information.

Create a redirect when an existing page's URL has changed

This process is a little more tricky. If there are existing aliases and redirects in place, this might block your new redirect from working. So you need to check what else has already been set up for the page first.

1. Check for aliases

Open the CMS page in Edit mode. On the right side of the screen, open the URL alias section and you'll see the aliases that exist for that page.

In the example above, we can see that there are 2 aliases for the page – the original one that matches the page title and a shorter one that was added later.

If there is more than one alias for a page, setting up a redirect won't work. You'll need to go to the Aliases screen and delete the second one.

2. Delete ONLY additional aliases

Don't delete ALL aliases for a page; leave the original alias that gives the page its URL.

On the screenshot above:

  • The alias under the English heading is the original page node alias.
  • The alias under the Language neutral heading was added later. You would delete this second one only. 

3. Check for existing redirects

Before adding any redirects, always check to see if any other redirects already exist for that page.

Open the CMS page in Edit mode. On the right side of the screen, open the URL redirects section and you'll see the redirects that exist for that page.

You can add, edit and delete redirects from here.

4. Archive the old CMS page

The From page must be archived for the redirect to work. (Only CMS users with site admin and approver permission level can archive pages.)

5. Add the redirect

To add a redirect:

  1. Go to the redirects screen and click Add redirect.
  2. All pages have a site code (e.g. vic.gov.au is site-4). You'll see it in a page's path when you're in the CMS.
  3. In the From field, type in the site code and the URL you want to redirect from.
  4. In the To field, type in the site code with a starting slash and the URL of the destination page.

Examples:

  • From /site-4/coronavirus-contact to /site-507/coronavirus-contact redirects the coronavirus contact page that used to be on the vic.gov.au website (site-4) to its new location on the coronavirus.vic.gov.au website (site-507).
  • From /site-507/second-step to /site-507/third-step would redirect social links and bookmarks traffic based on updates in restrictions so users read the latest information.
  • From /site-507/restrictions to /site-507/roadmap when we changed a page title due to a change in terminology used.

If your redirect is not working

Note that:

  • a page must be archived for a redirect to work
  • aliases take precedence over redirects, so check these too.

Other tools for making short URLs

We have a tool for making short URLs but it does not have the same functionality as .bitly or other URL shortening tools which provide photo and video display on social media.

It is mainly used by people who want short URLs that have government branding for publications.

Reviewed 13 July 2021

Vic Gov digital guide

Was this page helpful?