Advertising sustains the DA. Ads are hidden for members. Join today

Contributed modules for Drupal 7

Domain Access

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

The Domain Access 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. The module allows you to share users, content, and configurations across a group of sites such as:

  • example.com
  • one.example.com
  • two.example.com
  • my.example.com
  • thisexample.com <-- can use any domain string
  • example.com:3000 <-- treats non-standard ports as unique

By default, these sites share all tables in your Drupal installation.

The 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.

.htaccess changes (optional)

Default .htaccess file that comes with standard Drupal distribution handles www and non-www domains/subdomains for a specific domain. Below

Apache Mobile Filter and Domain Access configuration (optional)

To get Apache Mobile Filter and Domain Access (or other similar domain-based modules like Boost) working together, do the following:

Before installing

Introduction

Configuring settings.php

Remember, the Domain Access module lets you run multiple sites from a single installation. You only need one settings.php file. As a result

Installation

You will need to do the following before you install the module:

Installing the module

After you have prepared your server and made any edits to the default module behavior, you may install Domain Access like any other Drupal

Multiple TLD cookie, with db lookup

For use with Domain Access module only.

Multiple top level cookie domains

If you are only using sub domains and don't intend to add any top level domains, then just setting the cookie domain in your settings.php

Special instructions for shared hosting

Domain Access (DA) and related modules provide the capability to host multiple domains and sub-domains from a single Drupal installation.

Guide maintainers

agentrickard's picture