Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Configuration Language Lock 1.0.2 Minor update available for module config_language_lock (1.0.2). Release: Canvas Override 1.0.1 Minor update available for module canvas_override (1.0.1). Release: Media Remote Image 8.x-1.2 Minor update available for module media_entity_remote_image (8.x-1.2). Release: IDNA Convert Service (punycode) 2.0.4 Minor update available for module idna (2.0.4). Release: Bootstrap Cloud 7.1.3 Minor update available for theme bootstrap_cloud (7.1.3). Release: Token Browser 1.0.2 Minor update available for module token_browser (1.0.2). Release: Varbase Project 11.0.8 Minor update available for module varbase_project (11.0.8). Release: Media Remote Image 2.0.0-beta1 First beta version released for module media_entity_remote_image (2.0.0-beta1). Usage Milestone: Term CSV Export Import Module term_csv_export_import crossed 1,000 active installs. Security Coverage: Module Scout Module module_scout now has official Drupal security advisory coverage.

Domain Redirect

66 sites Security covered Drupal 10–11

Part of the Domain ecosystem · 39 projects

View on drupal.org

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.

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Mar 2026
Latest release
3 months ago
Releases (12 mo)
5 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core 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