Drupal is a registered trademark of Dries Buytaert
Search API Solr 4.4.0 Minor update available for module search_api_solr (4.4.0). Page Manager 8.x-4.0 Major update available for module page_manager (8.x-4.0). Trash 3.1.0-beta2 New beta version released for module trash (3.1.0-beta2). Commerce AutoSKU 3.0.1 Minor update available for module commerce_autosku (3.0.1). Custom Field 4.0.10 Minor update available for module custom_field (4.0.10). Alternative login ID & display names 2.0.12 Minor update available for module alt_login (2.0.12). EntityReference UUID 3.0.1 Minor update available for module entity_reference_uuid (3.0.1). LocalGov Publications Importer 1.1.1 Minor update available for module localgov_publications_importer (1.1.1). Configuration Override Warn 8.x-1.6 Module config_override_warn updated after 10 months of inactivity (8.x-1.6). Table Alternate Rows Module table_altrow crossed 1,000 active installs.

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:

  1. Go to Administration > Configuration > Search and metadata > URL redirects.
  2. When adding or editing a redirect, select a domain from the Domain dropdown or leave it as All domains for a global redirect.
  3. Use the Domain exposed filter to filter the redirect list by domain.

How it works

  • Adds a domain_id entity reference field to the redirect entity via hook_entity_base_field_info().
  • Decorates the redirect.repository service to filter redirect lookups by the active domain during request handling.
  • Replaces the RedirectUniqueHash entity 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 hash to 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.

Activity

Total releases
5
First release
Mar 2026
Latest release
2 months ago
Releases (12 mo)
5 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
2.0.0 Stable May 13, 2026
2.0.0-rc1 Pre-release Apr 14, 2026
2.0.0-beta2 Pre-release Mar 14, 2026
2.0.0-beta1 Pre-release Mar 13, 2026
2.x-dev Dev Mar 13, 2026