Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Domain Masquerade

No security coverage Under active development

Part of the Domain ecosystem · 53 projects

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

Ask your assistant about Domain Masquerade

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

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
10 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

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