Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

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

Activity

Total releases
1
First release
Dec 2025
Latest release
7 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.x-dev Dev Dec 4, 2025