In this exercise you’ll learn how to create a redirect.
Note: Managing redirects on the site requires “privileged” role access, such as an Administrator. Although you have Administrator access for the training site, this may not be the case for your own GovCMS website.
In this exercise we’ll create a fully custom redirect from a short URL to a page of your preference.
In the Admin Menu, click on Configuration, hover over Search and metadata, then click URL Redirects.
Click the Add Redirect button at the top left of the page.
Enter Path with your preferred redirect URL. This is the URL where your page, selected in the next step, will be redirected from. This should not be an existing alias or content URL in your site. In the screenshot below we use, as an example: short-redirect as the Path.
In the “To” field, type the title (or part of the title) of the page that you need to be redirected to. This autoselect field will locate the page, using your input. Select the page you want to redirect by clicking it.
You can redirect to an external URL, by entering a full URL in the “To” field - for example, https://salsadigital.com.au/ (make sure you enter the schema or full address, such as https://, or the redirect won’t function).
Press the Save button.
Test your new redirect by going to the Path you provided in step 3 (including the full URL to this Path and confirming that the page you selected in the To field is displayed. What’s the page URL now?
In this exercise you will learn how to update a page’s URL alias.
Add a Page: From the Admin menu click on Content, then hover over Add content and click on Page.
Fill out the fields as shown in the screenshot below, such as Title. On the right-hand side of the form, click to expand the URL Alias section.
Uncheck Generate automatic URL Alias.
Make sure the 'URL alias' field is empty.
Set the Save As dropdown to Published.
Click on the Save button at the bottom of the page.
Navigate to the page you saved - note the URL.
Your content should have a URL like: http://example.com/node/100
In this example “node/100” is the internal Drupal path for the page. The number "100" is a unique number that Drupal uses to store information about this specific page. In Drupal, this is called the "node ID". Each page will have a different number. The number "100" will be different on your site.
Note down this URL for the next exercise.
This unit discusses URL aliases and redirects and how they relate to URLs.
A URL (Uniform Resource Locator) is a web address. While some can be long and meaningless, others can be simple and descriptive.
For example, the URL below does not provide a good description of the content it will provide to a site visitor:
This URL, on the other hand, provides clear information about the source or organisation (GovCMS) as well as the topic of the content (support):
URLs can be automatically generated based on the Page title of a piece of content, automatically generated numerically, or specified using a URL alias.
Drupal (and GovCMS) creates and maintains its own internal URL for each piece of content. These URLs contain the node/ path and a number, for example https://mywebsite.gov.au/node/15. This address is only accessible to content authors and administrators that are logged in to the site.
It also (by default) creates a URL based on the Title of content. For a Standard Page with a title of 'My Example Standard Page' would have both the following URLS:
https://mysite.gov.au/node/15 (accessible only to logged in users), and;
https://mysite.gov.au/my-example-standard-page - accessible to site visitors (and search engines)
URL aliases are used to create more user-friendly URLs as discussed below.
A URL alias is a manually created, specific, descriptive URL for a page on a website. There are three main benefits of using a URL alias:
Create more descriptive and meaningful URL for users.
URL aliases are read by search engines, and form an important component of Search Engine Optimisation (SEO).
They make websites, its links and results in search engines look more professional.
URL aliases are generally the best type of URL for content authors to provide for site visitors to use.
Sometimes an alternative URL is required for a web address or piece of Content. This may be due to an incorrect URL being published in print, or when providing a link from another website, where a shorter URL is preferable (for example, for a marketing campaign).
Redirects are also created automatically by GovCMS to make sure only one (usually the latest) URL alias is functional and to ensure previously created URL aliases do not return “404 Not Found” response.
The screenshot below illustrates how Redirects forward all traffic to the latest Alias for a given URL.
In this exercise you’ll learn how to create a URL alias for a page.
Return to edit the page created in . (From the Admin menu click on Content, then click on your page from the list and click the Edit menu item).
Expand the URL alias section.
Set a custom URL alias, such as /important-content-page (you may choose your own). Note The URL must begin with a backslash: '/'
Click on the Save button.
Note the new URL for the page.
Try navigating to the /node/100 path noted down in the previous exercise, by pasting it into the address bar of your browser. (The node ID number - 100 - will differ for you).
Next, return to Edit the page from step 1.
Under the URL Alias section on the right-hand side, check the Generate automatic URL alias box.
Save the page - compare the results.
Check if the internal path (such as node/100) still works.
Check if the manually entered URL alias from step 2 is still functional.
Ask your trainer any questions.