ITS

Information Technology Services
Information Technology Services

Managing URL Aliases


What is a URL Alias?

A URL alias allows you to create a “friendly” URL for your content. Every piece of content that you create (e.g., pages, slideshows, etc.) automatically gets assigned a unique identifier, known as a Node ID. If you were to create a new page with no URL alias, the URL for your content would be in the format www.queensu.ca/yoursite/node/ID. For example, this tutorial would be found at:

http://www.queensu.ca/its/node/1270

In fact, if you click this hyperlink, you’ll notice that it still works to access the tutorial. For users looking for information on your site, however, it doesn’t provide much information. That’s why adding an alias is helpful. It provides an alternative, more informative address for users to access the content.

Alias Management for Publishers and Editors

Creating a URL Alias

  1. Navigate to the page for which you want to create a URL Alias and click the “Edit Draft” tab or create a new page. The Edit draft screen will open.
  2. Scroll to the bottom of the screen and select the “URL Path settings” tab.
  3. By default, the “Generate automatic URL alias” option will be selected. When this option is selected, a URL alias will be automatically created based on the title of your page. For instance, a page with a title of 'Creating a URL Alias' would generate an automatic URL alias of 'creating-url-alias' (note that strings such as 'a', 'an', 'and', etc., are automatically excluded from URL aliases) . If you would like an alias to be automatically created based on the page's title and position in the structure of the site, leave this option checked and click “Save”.

Screenshot of the URL path settings tab with 'Generate automatic URL alias" selected

screenshot of a page with an automatically generated url

  1. Optional: If you would prefer to create a custom URL Alias (e.g., if you prefer a shortened alias), uncheck the “Generate automatic URL alias” option, and add the custom text that you would like to appear. Click "Save".
    Tip: When adding a custom alias, there are a couple of things to remember. It is highly recommended that you separate words using dashes instead of spaces. For example, if your desired alias is "managing url aliases", you should enter "managing-url-aliases" into the URL alias field. Otherwise, spaces will be represented in your URL as "%20". Additionally, while an automatically generated alias will include the full path to the page (e.g., webpublish/tutorials/page-administration/managing-url-aliases), this will not automatically be added when creating a custom alias. If you would like the full path to be included, you will need to add it in the URL alias field.

Screenshot of the URL Path Settings tab with a custom alias

screenshot of a page with a custom URL alias

Editing a URL Alias

  1. Navigate to the page for which you want to edit a URL Alias and click the “Edit Draft” tab. The Edit draft screen will open.
  2. Scroll to the bottom of the screen and select the “URL Path settings” tab.
  3. If you previously selected “Generate automatic URL alias”, uncheck this option. Note: If you would like to change the alias but want to leave this option enabled, you can modify the title of the page - the alias will be altered accordingly.
  4. Modify the alias as desired.

screenshot of the URL path settings field with a modified alias

  1. Click Save. The old alias will be deleted and a new alias will be generated.

screenshot of a page with the URL alias edited

Deleting a URL Alias

  1. Navigate to the page for which you want to delete a URL Alias and click the “Edit Draft” tab. The Edit draft screen will open.
  2. Scroll to the bottom of the screen and select the “URL Path settings” tab.
  3. If you previously selected “Generate automatic URL alias”, uncheck this option.
  4. Remove any text from the URL alias field.

Screenshot of the URL path settings tab with the alias removed

  1. Click Save. The URL alias will now be deleted. Without an alias, when the page is published the URL will appear as https://www.queensu.ca/yoursite/node/id.

screenshot of a page with the URL alias removed

Alias Management for Site Administrators

The Configuration > URL Aliases function provides you with some additional alias management features that are not otherwise available when editing aliases from within an individual page. One thing to keep in mind when managing aliases using this tool, is to be sure that you note the Node ID of the page that you are managing beforehand. You can find this by going to "Edit Draft" of the page - the node/id will be displayed near the end of the URL.

 

Creating a URL Alias from Configuration > URL Aliases

  1. From the Management Menu, navigate to Configuration > URL Aliases.

screenshot of the URL aliases option under Configuration

  1. Click the “Add alias” button near the top of the screen.

Screenshot of the "Add Alias" button in URL Aliases

  1. In the “Existing system path” field, add the Node ID in the format node/id.
  2. In the “Path alias” field, add the alias as you would like it to appear in the URL.
    Tip: When adding a custom alias, there are a couple of things to remember. It is highly recommended that you separate words using dashes instead of spaces. For example, if your desired alias is "managing url aliases", you should enter "managing-url-aliases" into the URL alias field. Otherwise, spaces will be represented in your URL as "%20". Additionally, while an automatically generated alias will include the full path to the page (e.g., webpublish/tutorials/page-administration/managing-url-aliases), this will not automatically be added when creating a custom alias. If you would like the full path to be included, you will need to add it in the URL alias field.

Screenshot of the new alias form with fields filled in as described in steps 3 and 4

Screenshot of the page with displaying the new URL Alias

Editing a URL Alias from Configuration > URL Aliases

  1. From the Management Menu, navigate to Configuration > URL Aliases.
  2. Locate the node/id of the page and the alias that you would like to edit.
    Tip: Once in URL Aliases, to help with locating the correct entry in the table, click the "SYSTEM" header to sort entries based on Node ID.
  3. In the Operations column for this entry, click ‘edit’.

screenshot of the URL alias table, highlighting the edit option

  1. In the “Path alias” field, modify the alias as desired.

screenshot of the URL Aliases > edit screen, highlighting changes to the path alias field

  1. Click Save. The alias will be updated.

screenshot of the page with modified page alias

Deleting a URL Alias from Configuration > URL Aliases

  1. From the Management Menu, navigate to Configuration > URL Aliases.
  2. Locate the node/id of the page and the alias that you would like to delete.
    Tip: Once in URL Aliases, to help with locating the correct entry in the table, click the "SYSTEM" header to sort entries based on Node ID.
  3. In the Operations column for this entry, click ‘delete’.

screenshot of the URL Aliases table, highlighting the delete option

  1. You will be notified that this action cannot be undone and asked to confirm. Click Confirm. The alias will now be deleted.

Screenshot of the delete confirmation screen "This action cannot be undone"

Screenshot of the page with the URL alias deleted