This module allows you to create unique path aliases for each domain configured in your Drupal site, enabling the use of the same path alias on different domains without conflict. It prevents duplicate path aliases within the same domain, ensuring that each unique alias is tied to a specific domain.
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.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.1-beta6 | Pre-release | 10–11 | Aug 20, 2026 | ||
| 1.0.1-beta5 | Pre-release | 9–11 | Sep 2, 2025 | ||
| 1.0.1-beta4 | Pre-release | 9–11 | May 23, 2025 | ||
| 1.0.1-beta3 | Pre-release | 9–11 | Feb 15, 2025 |