How do I configure URL alias patterns in Drupal?

The Citead team, updated

In short. Configure a Pathauto pattern under URL aliases > Patterns, select its content types, insert tokens and save it to generate aliases for new content.

Definition: A Drupal URL alias is an alternative path to content. As of 17 October 2026, Pathauto generates aliases from patterns containing tokens, placeholders replaced with values such as a content title.

Key facts

Where is a pattern configured?

The module's routing definition places the Patterns screen at this administrative path:

/admin/config/search/path/patterns

The README configuration instructions give the menu route as Administration > Configuration > Search and metadata > URL aliases > Patterns. With Pathauto and Token enabled, Add Pathauto pattern opens the creation form. Pattern type selects the entity type, meaning the kind of Drupal object that receives aliases, such as content or taxonomy terms.

Path pattern contains the alias template. Label identifies the pattern in the administrative list. The pattern form implementation also exposes content-type selection and an Enabled checkbox. Selecting the intended content types limits where the pattern applies. After the template and label are filled in, saving records the pattern for use when new content is saved.

How do tokens become an alias?

The README identifies Browse available tokens as the control for viewing variables while constructing a pattern. Its title token, [node:title], supplies the content title. The browser shows tokens relevant to the selected pattern type.

The module's functional test uses this pattern for content:

/content/[node:title]

Here, /content/ is a fixed prefix and [node:title] is the variable part. The same test creates an article titled “Sample article” and checks that its generated alias is:

/content/sample-article

This is a documented test example. The site's alias settings determine how token text is cleaned, so the pattern and those settings need to be reviewed together.

How is the generated path checked and maintained?

A practical check is to save a new content item covered by the pattern with Generate automatic URL alias selected, then open the generated path. The widget implementation skips automatic generation when no matching pattern exists, making the pattern's type and content-type selection useful checks when the checkbox is missing.

The settings form defines Separator as the character that separates words in titles. Character case controls lowercase conversion. Update action governs an existing alias when content changes: it can preserve the old alias without creating another, create a replacement while keeping the existing alias functional, or create a replacement and delete the old alias. Reviewing this choice before changing title-based patterns helps control URL changes.

The README's notices explain that standard Drupal paths remain functional alongside aliases. A generated alias therefore adds an alternative route to the same content.

FAQ

Can I use different patterns for different content types?

Yes. The pattern form lets you select which content types a pattern covers. An empty selection allows any type, so select the intended types when creating separate templates.

How do I apply a pattern to existing content?

Use Bulk generate and select the relevant path types. The bulk generation form offers Generate a URL alias for un-aliased paths only; additional update options depend on the configured Update action.

Can I enter a custom alias for one page?

Yes. The editing widget instructs you to uncheck Generate automatic URL alias before entering a custom alias in the field below.

Sources

  1. Pathauto project, “README.md”, undated, version 8.x-1.15
  2. Pathauto project, “PatternEditForm.php”, undated, version 8.x-1.15
  3. Pathauto project, “PathautoSettingsForm.php”, undated, version 8.x-1.15
  4. Pathauto project, “PathautoWidget.php”, undated, version 8.x-1.15
  5. Pathauto project, “pathauto.routing.yml”, undated, version 8.x-1.15
  6. Pathauto project, “PathautoNodeWebTest.php”, undated, version 8.x-1.15
  7. Pathauto project, “PathautoBulkUpdateForm.php”, undated, version 8.x-1.15

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark