URL Aliases

What are URL aliases?

A URL alias is a clean path for your pages. It converts the node's node/### path into something more user-friendly. It determines the portion of the URL after your site's base path.

For example: The URL alias for this page is: documentation/drupal-user-guide/url-aliases

Creating a URL alias for a page

You can create an alias one of two ways. You can either create or edit one when you are creating your content, or you can create or edit one later by going to the URL Aliases option from your administrative toolbar.

URL Aliases Toolbar Option

Clicking on URL Aliases from the administrative toolbar will bring you to a listing of all aliases for your site. This page allows you to search your aliases, add new aliases, and modify or delete aliases that are incorrect.

Note: As with all deletion in Drupal, deletion of aliases is permanent. Be careful.

A sample of a URL alias listing page
Figure 1. A sample of a URL alias listing page. View full-size image.

Clicking on Add alias near the top of this page will allow you to create a new alias for an unaliased page. In order to do this you need to provide the Existing system path (the node/### format) and the Path alias that you want to use to refer to the page. Clicking Save will create the new alias.

Alias creation
Figure 2. The alias creation screen. View full-sized image.

URL Aliases during content creation

See URL Alias in Content Settings for creating an alias during creation.

Best Practices

  • Aliases should never contain a slash at the start or end
  • Aliases should never contain a space
  • Aliases should only contain lower case letters, numbers and hyphens
  • Aliases must be unique
  • Aliases should not start with any subsite name followed by a slash
  • Aliases should only ever be relative paths