Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Split admin domain

Security covered Under active development 1 sites

This module allows you to use separate hostnames for your website's public visitors and its administrators, while still running on a single Drupal installation. It can route administrative tasks to a secure backend domain while keeping the public-facing site accessible on a different domain. This is useful for enhancing security by restricting network access to the admin area and for providing a cleaner URL structure.

Split Admin Domain lets one Drupal site use two hostnames: one for visitors and one for administration.

Editors and administrators use a backend domain (for example, admin.example.com), while the public site remains on the frontend domain (for example, www.example.com). Drupal still runs as a single installation with one codebase and database. The module controls which hostname serves administrative and public URLs.

Typical reasons to use it:

  • Restrict the admin hostname using a VPN or firewall while keeping the public site accessible.
  • Keep /admin and other editing routes off the public domain.
  • Open links that switch between the frontend and backend domains in a new tab.

The module does not replace Drupal authentication, roles, permissions, or HTTPS. It helps separate the public and administrative interfaces, but additional access controls are needed to protect the backend.

Features

Basic functionality

  • Redirect /admin and /admin/* to the backend domain.
  • Redirect non-admin paths on the backend domain to the frontend.
  • Treat the backend homepage (/) as the admin interface when path stripping is enabled.
  • Generate links with the appropriate hostname for menus, toolbar links, and forms.
  • Open links that switch between domains in a new tab (target="_blank").

Additional features

  • Additional admin paths: Configure patterns such as /node/*/edit and /media/add to serve common editing routes on the backend domain.
  • Optional /admin path stripping: Convert URLs such as /admin/config to /config on the backend, while avoiding conflicts with existing document root directories such as /modules and /themes.
  • Scheme and port handling: Preserve the visitor's scheme and port when generating cross-domain redirects to avoid breaking HTTP and HTTPS session handling.
  • Shared sessions: Support sessions across subdomains when both hosts share a parent domain, using cookie_domain in services.yml.

When to use it

  • You want a dedicated admin subdomain that can be restricted at the network level.
  • You want to keep administrative routes off the public hostname.
  • You have a traditional Drupal site and need a straightforward frontend/backend domain split rather than a full multi-domain content system.

Post-Installation

  1. Configure both hostnames to point to the same Drupal document root and database.
  2. Add both hostnames to $settings['trusted_host_patterns'] in settings.php.
  3. Enable the module and navigate to Administration → Configuration → System → Split Admin Domain (/admin/config/system/split-admin-domain).
  4. Configure the following settings:
    • Frontend domain: The public site URL.
    • Backend domain: The administration URL.
    • Strip /admin from backend paths: Optional.
    • Additional admin paths: One pattern per line, with defaults covering common editing routes.
  5. To share sessions across subdomains, configure a common cookie domain in services.yml, then log out and log in again.
parameters:
  session.storage.options:
    cookie_domain: '.example.com'

If the hostnames do not share a parent domain, browsers cannot share the session cookie. Users will need to authenticate separately on each domain.

The module does not introduce new content types or text formats. Its configuration consists of the settings form, along with the necessary server, DNS, trusted host, and optional cookie domain configuration.

Additional Requirements

  • Drupal 11.1 or 12 (depends on Drupal core's system module).
  • Two hostnames pointing to the same Drupal installation.
  • Both hostnames configured in $settings['trusted_host_patterns'].
  • For shared sessions, a common parent domain and a cookie_domain setting in services.yml.

No additional contributed modules, PHP libraries, or external APIs are required.

  • Admin Toolbar — provides faster navigation through Drupal's administration interface.
  • A WAF, VPN, or firewall for the backend hostname — helps restrict access to the administrative interface.

Similar projects

  • Admin Domain — separates administration and public domains using domain assignment and access permissions. Split Admin Domain focuses on a frontend/backend pair, configurable admin path patterns, optional /admin stripping, and scheme and port handling.
  • Domain — supports multi-domain content, access, and configuration. It is better suited to sites that need domain-aware content management rather than just a separate administrative hostname.

Additional notes

  • When path stripping is enabled, the module avoids rewriting paths such as /admin/modules and /admin/themes to /modules and /themes, which could conflict with directories in the document root.
  • This module does not replace authentication, HTTPS, or network-level access restrictions. Combine it with these controls to protect the backend.
Drupal 11 · not 10

Ask your assistant about Split admin domain

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

  • system Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
7
Tracked since
Sep 2026
Latest release
4 weeks ago
Releases (12 mo)
7 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.8 Stable 11 Oct 16, 2026
1.0.6 Stable 11 Oct 13, 2026
1.0.5 Stable 11 Oct 12, 2026
1.0.3 Stable 11 Oct 6, 2026
1.0.2 Stable 11 Oct 6, 2026
1.0.1 Stable 11 Oct 1, 2026
1.0.0 Stable 11 Sep 30, 2026