Drupal is a registered trademark of Dries Buytaert
cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)!

domain_redirect

42 sites Security covered
View on drupal.org

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
1 month ago
Release cadence
15 days
Stability
20% stable

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