The Domain project is a suite of modules that provide tools for running a group of affiliated sites from one Drupal installation and a single shared database.
Drupal 10/11 status
Releases in the 2.x and 3.x series are compatible with Drupal 10.2 and higher.
The 2.0.x branch is considered feature complete and will receive bug fixes only.
All new features will be added exclusively to the 3.x branch.
Version 3
Major architectural change introduced in 3.x
Domain 3.x migrates to use Drupal core's Config Collections system for managing domain configuration overrides, replacing the custom override system used in 2.x.
Benefits of the Config Collections approach
- More standardized approach aligned with Drupal core architecture
- Better integration with Drupal's native configuration management system
- Improved performance and cleaner codebase
- More sustainable long-term solution as it leverages core APIs
- Future-proof architecture that will be easier to maintain
Path prefix feature
Domain 3.x also introduces path prefix support (experimental), allowing multiple domains to share a single hostname while being distinguished by the first segment of the URL path. For example:
example.com/corporate/— a corporate divisionexample.com/retail/— a retail divisionexample.com/fr/— a French-language variant
This is useful for sites that cannot add new hostnames due to corporate firewalls, shared hosting, or single-origin CDN constraints, or simply prefer organizing affiliated sites under a single domain.
Overview
The module allows you to share users, content, and configurations across a group of sites such as:
example.commy.example.comthisexample.com— can use any domain stringexample.com:3000— treats non-standard ports as uniqueexample.com/section/— path prefix (3.x only)
By default, these sites share all tables in your Drupal installation.
Installation
Drupal 10.2 and higher
No changes are required to install the module, but certain configurations need to be edited in services.yml. See the README for details.
Technical background
The Domain Access module uses Drupal's Node Access system to determine what content is available on each site in the network. Unlike other multi-domain modules for Drupal, the Domain Access module determines user access based on the active domain that the user is viewing, rather than which group or site the user belongs to.
This module uses some advanced Drupal concepts and requires that you understand and control your site's DNS configuration. See this case-study or this more recent Row Eleven Wine Co. post for more details about using Domain Access.
You can also watch video of the DrupalCON Paris session "Managing Multiple Sites with Domain Access" (from 2009).
Contributed Modules
A number of modules have been contributed by other developers to extend the features of Domain Access.
Credits
Development is sponsored by Palantir.net.
Original development was sponsored by Morris DigitalWorks with an assist from DZone.
Project information
- Project categories: Access control, Developer tools, Multilingual
11,123 sites report using this module
- Created by Gurpartap Singh on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.




