Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Domain Redirect

Security covered Under active development 82 sites

Part of the Domain ecosystem · 53 projects

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.

Drupal 10–11

Ask your assistant about Domain Redirect

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

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
5 months ago
Releases (12 mo)
5 ▲ from 0
Maintenance
Active

Release Timeline

Releases

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