Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

This module allows administrators and content managers to temporarily view the site as if they were visiting from a different domain, without changing the browser's URL. It's useful for previewing domain-specific content, testing access controls, or demonstrating how the site appears on different domains.

Features

Basic Functionality

Domain Masquerade enables administrators and content managers to temporarily "switch" to viewing the site as if they were visiting from a different domain, all while staying on the current URL. The active domain context changes but the browser's address bar remains unchanged.

Unique Features

  • Session-based domain switching - The masquerade state persists across page loads within your browser session
  • Domain Switcher block - A ready-to-use block displays all active domains as clickable links
  • Admin route protection - Administration pages always use the real domain to prevent accidental configuration issues
  • Automatic validation - Invalid masquerade states (deleted or disabled domains) are automatically cleared
  • Decorator pattern integration - Seamlessly integrates with Domain module's negotiator service

Use Cases

  • Content Management: Preview domain-specific content, blocks, and menu items without leaving your current domain
  • QA Testing: Verify domain-based access controls and visibility rules in a single browser session
  • Development: Debug multi-domain issues without switching browser profiles or hosts files
  • Training: Demonstrate how the site appears to visitors on different domains

Post-Installation

  1. Configure permissions at /admin/people/permissions:
    • Grant the "Masquerade as any domain" permission to trusted roles (administrators, content managers). This permission is marked as restricted for
      security.
  2. Place the Domain Masquerade Switcher block:
    • Navigate to /admin/structure/block
    • Find the "Domain Masquerade Switcher" block and place it in a visible region (toolbar, sidebar, etc.)
    • The block only appears to users with the masquerade permission
  3. Using the switcher:
    • Click any domain name in the block to view the site as that domain
    • The currently active domain is shown in bold
    • Click "Clear masquerade" to return to the real domain based on your URL

No configuration page is required—the module works immediately after enabling and placing the block.

Additional Requirements

  • Drupal core: 10.3 or higher, or Drupal 11
  • Domain module: Required for multi-domain functionality

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
1
Tracked since
Dec 2025
Latest release
8 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Core Release date
1.0.x-dev Dev 10–11 Dec 4, 2025