This project is not covered by Drupal’s security advisory policy.
Domain Unique Path Alias allows Drupal sites using the Domain
ecosystem to reuse the same path alias across different domains.
By default, Drupal requires path aliases to be unique globally. On a
multi-domain website, this prevents different content from using the same URL
path, even when the content belongs to different domains.
This module makes path aliases unique per domain.
Example
Consider a Drupal installation serving two domains:
domain1.example.com
domain2.example.com
You want both domains to expose a /contact page, but each domain
should resolve it to different content.
Without this module, Drupal prevents the second alias from being created.
With Domain Unique Path Alias:
domain1.example.com/contact → Node 1
domain2.example.com/contact → Node 2
Both aliases can coexist because they belong to different domains.
Duplicate aliases are still prevented within the same domain:
domain1.example.com/contact → Node 1
domain1.example.com/contact → Node 3 ❌
Features
- Allows the same path alias to exist on different domains.
- Keeps path aliases unique within each domain.
- Integrates with Drupal's
path_aliasentity. - Associates path aliases with their corresponding domain.
- Supports multi-domain Drupal installations using the Domain ecosystem.
- Supports Drupal 9.4, Drupal 10 and Drupal 11.
How it works
The module extends Drupal's path alias handling with domain awareness.
Path alias uniqueness is evaluated using:
alias + domain
instead of only:
alias
For example:
| Alias | Domain | Allowed |
|---|---|---|
/contact |
Domain 1 | Yes |
/contact |
Domain 2 | Yes |
/contact |
Domain 1 | No, duplicate |
Use cases
This module is useful when:
- Several domains share the same Drupal installation.
- Each domain manages its own content.
- Domains need independent URL structures.
-
Common paths such as
/contact,/about,
/productsor/servicesneed to exist on multiple
domains.
Installation
Install the module using Composer:
composer require 'drupal/domain_unique_path_alias:^1.0@beta'
Then enable it:
drush en domain_unique_path_alias
Requirements
This module is intended for multi-domain Drupal installations using the
Domain ecosystem.
| Attachment | Size |
|---|---|
| same-path-alias-constrains.png | 24.29 KB |
| same-path-alias-domain-constrains.png | 59.06 KB |
| path_alias_table.png | 76.91 KB |
Project information
Seeking co-maintainer(s)
Maintainers are looking for help reviewing issues.- Project categories: Administration tools, Content editing experience
- Ecosystem: Domain
113 sites report using this module
- Created by s1933 on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
Development version: 1.x-dev updated 2 Sep 2026 at 08:42 UTC
