How to create a URL redirect

This guide covers how to create a redirect when a short URL is needed for advertising or social media, a site has been migrated to Single Digital Presence (SDP) or a page has been archived.

A redirect automatically makes a browser go from one URL to another URL. This avoids a page error when a user tries to access a page that’s no longer available at a particular URL.

Note: when you change the title of a page and edit its alias, a redirect is automatically created. Visit: how to edit the URL or alias of a page.

On this page

Why can’t we just add 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.

Creating a CMS redirect

Login to the CMS: content.vic.gov.au

Search for the page within the Content tab and select the Title of the page. Here you’ll find the the CMS URL and site number for the page. You’ll need this information to put the redirect in place.

For example, the CMS link for the Department of Government Services page is: https://content.vic.gov.au/site-4/department-government-services - showing the site number is site-4.

Hover over Configuration > Search and metadata > then select URL redirects.

Use the instructions below according to the type of redirect you need to create.

Creating a redirect for a short URL (advertising or social media)

Once the Redirect page is open, select +Add redirect.

In the Path field, type in the site code and the promotional URL you want to redirect from. For example: /site-408/education-complaint (a short URL to use in advertising)

In the To field, start typing the page title and select your chosen destination page from the dropdown that appears. For example: /site-507/make-complaint-or-concern-about-your-school (the node or page alias that matches the page title).

Click Save and test it on the live site.

Create a redirect for a page that's been archived

Once the Redirect page is open, select +Add redirect.

In the Path field, type in the site code and the URL you want to redirect from (the archived page). Make sure there's no slash at the start in the field.

In the To field, start typing the page title and select your chosen destination page from the dropdown that appears (the live page).

Click Save and test it on the live site.

Redirects from SDP pages to external sites

This should only be done for SDP pages that are archived and content is being hosted elsewhere.

Once the Redirect page is open, select +Add redirect.

In the Path field, type in the site code and the URL you want to redirect from (the archived page). Make sure there's no slash at the start in the field.

In the To field, paste the new url in (the live page).

Click Save and test it on the live site.

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.

Redirects from external sites must be made in the DNS (domain name system). Generally departmental digital teams will manage the DNS settings for all the domain names they own.

A spreadsheet should be prepared listing the old URLs and and the new URLs. Here are a couple of examples.

Most content will be migrated into a section on vic.gov.au. A few entities will have standalone websites.

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.

Redirect troubleshooting

Test in an incognito browser

Add the URL to an incognito browser window to see if it’s redirecting to the correct page.

Your existing browser may be caching and not opening the URL redirect.

Check for aliases

Existing aliases and redirects may block your new redirect from working. Check what other aliases and redirects exist for the page before adding a redirect.

Open the CMS page in Edit. 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.

Delete 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. Just delete this second one if you're adding a redirect because you're archiving the page.

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.

Archive the old CMS page

A redirect won't work if the 'from' page is still live. Archive the page and check again.

Only CMS users with site admin and approver permissions can archive pages. CMS users with edit permissions can set a page to Archive Pending which will go to the publishing queue for actioning.

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.

Facebook post display of title following a change of URL or alias

It will take time following the change of a title and url/alias for Facebook to recognise the change. You can make the change display more quickly by using the Facebook sharing debugger.

Â