This module makes URL redirects aware of the active domain, allowing the same source path to redirect to different destinations depending on which domain is currently being viewed. It adds a domain field to redirects, enabling domain-specific rules that take precedence over global ones, and facilitates management with domain filtering in the redirect list.
Makes redirects domain-aware, allowing the same source path to redirect to different destinations depending on the active domain.
Features
- Adds a Domain field to redirects — scope a redirect to a specific domain or leave it global (all domains).
- Domain-specific precedence — when the same source path has both a domain-specific and a global redirect, the domain-specific one wins.
- Domain column and filter in the redirect admin list for easy management.
- Domain-aware unique hash validation — the same source path can have different redirects on different domains.
Requirements
Configuration
No configuration is needed. Once installed:
- Go to Administration > Configuration > Search and metadata > URL redirects.
- When adding or editing a redirect, select a domain from the Domain dropdown or leave it as All domains for a global redirect.
- Use the Domain exposed filter to filter the redirect list by domain.
How it works
- Adds a
domain_identity reference field to the redirect entity viahook_entity_base_field_info(). - Decorates the
redirect.repositoryservice to filter redirect lookups by the active domain during request handling. - Replaces the
RedirectUniqueHashentity constraint with a domain-aware version that allows the same source hash for different domains. - Modifies the database index on the redirect table from a unique key on
hashto a composite index on(hash, domain_id)for query performance.
Note
Starting with 2.x, this module was completely rewritten with no upgrade path from prior versions (7.x / 8.x). The original module used custom redirect paths (/domain-redirect/12345). The 2.x version integrates with the Redirect module instead. See HISTORY.md in the repository for details about the original module.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Domain ecosystem
Most installed first
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 2.0.0 | Stable | 10–11 | May 13, 2026 | ||
| 2.0.0-rc1 | Pre-release | 10–11 | Apr 14, 2026 | ||
| 2.0.0-beta2 | Pre-release | 10–11 | Mar 14, 2026 | ||
| 2.0.0-beta1 | Pre-release | 10–11 | Mar 13, 2026 | ||
| 2.x-dev | Dev | 10–11 | Mar 13, 2026 |