Skip to main content
Drupal is a registered trademark of Dries Buytaert
EOL Warning: Drupal 11.0 has reached end of life and no longer receives security updates. EOL Warning: Drupal 10.3 has reached end of life and no longer receives security updates. EOL Warning: Drupal 10.2 has reached end of life and no longer receives security updates. EOL Warning: Drupal 10.1 has reached end of life and no longer receives security updates. EOL Warning: Drupal 10.0 has reached end of life and no longer receives security updates. EOL Warning: Drupal 9.5 has reached end of life and no longer receives security updates. EOL Warning: Drupal 9.4 has reached end of life and no longer receives security updates. EOL Warning: Drupal 9.3 has reached end of life and no longer receives security updates. Release: Raven: Sentry Integration 7.5.2 Minor update available for module raven (7.5.2). Usage Milestone: jQuery UI Datepicker Module jquery_ui_datepicker crossed 1,000 active installs.

This module enhances the "Short URL" module to work within a multi-domain setup. It allows the same short URL path to exist on different domains, each pointing to a unique destination, and ensures redirects and visit tracking are correctly handled for each specific domain. The module also adds a domain assignment field to short URL nodes for better organization.

Multi-domain awareness for the Short URL module. Adds per-domain slug scoping, a domain field on short URL nodes, and domain-aware redirects.

Features

  • Per-domain slug scoping — the same slug (e.g. /blog) can exist on multiple domains, each pointing to a different destination
  • Domain field on short URL nodes — assign each short URL to a specific domain
  • Domain-aware redirects via Domain Redirect — redirects are scoped to the correct domain automatically
  • Domain-aware visit tracking — the shorturl_visits table gains a domain_id column so statistics can be filtered per domain
  • Domain-aware slug generation — auto-increment counters can be scoped per-domain or kept global
  • Form integration — the domain selector appears on the short URL node form, with access control via Domain Access
  • Configuration UI at /admin/config/domain/shorturl for counter scope settings

Requirements

Optional

  • Domain Access (^3) — filters the domain selector on the node form by the user's assigned domains

Architecture

The module uses service decoration to extend the base Short URL services:

  • DomainAwareShortUrlManager decorates ShortUrlManager — injects the domain ID into redirects and visit records
  • DomainAwareSlugGenerator decorates SlugGenerator — adds domain-scoped uniqueness checks and per-domain counters
  • DomainAwareVisitMiddleware replaces the base visit middleware to record the active domain on each visit

Installation

composer require drupal/domain_shorturl
drush en domain_shorturl

The install hook automatically:

  • Adds a domain_id column to the shorturl_visits table
  • Adds the domain field to the short URL form and view displays

Uninstalling the module cleanly reverses these changes.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Apr 2026
Latest release
2 months ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
1.0.0-beta1 Pre-release 10–11 Jun 9, 2026
1.0.0-alpha2 Pre-release 10–11 Apr 13, 2026
1.0.0-alpha1 Pre-release 10–11 Apr 13, 2026
1.x-dev Dev 10–11 Apr 13, 2026