Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Domain Route Access (UI)

Security covered Under active development 44 sites

Part of the Domain ecosystem · 53 projects

This module allows administrators to control which domains specific routes are accessible on. You can configure which domains are allowed for a given route, preventing users from accessing certain pages on unwanted domains.

The Domain Route Access UI module provides a new configuration entity to manage access to existing routes by domain from back office.

Use case example:
You have two domains example1.com and example2.com and you want users to be able to create their accounts only on the example2.com domain. With Domain Route Access, you can achieve this by adding an access check on the user.register route so that it is only accessible on example2.com.

Configuration

To add new Domain Route Access check:

Option 1: Via Domain Route Access config entity

  1. Go to Domain Route Access config entity collection page: /admin/config/domain/route-access
  2. Click Add new Domain Route Access action link
  3. Fill in the new Domain Route Access config entity form and click Save
  4. Clear Drupal cache

For each Domain Route Access configuration entity, you could:

  • Select the route for which you want to check access by domains
  • Select the allowed domains on which the route should be accessible
  • Enable/Disable the Domain Route Access check


Option 2: Using existing _domain route requirement

my_module.custom_route:
  path: '/foo/bar'
  defaults:
    _controller: 'Drupal\my_module\Controller\BarsController'
  requirements:
    _permission: 'view bars content'
    _domain: 'domain1_id+domain2_id'

Additional Requirements

Domain Route Access requires Domain contrib module.

Drupal 9–10 · not 11

Ask your assistant about Domain Route Access (UI)

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

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Mar 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
1.0.1 Stable 9–10 Mar 23, 2024
1.0.0 Stable 9–10 Mar 17, 2024
1.0.x-dev Dev 9–10 Mar 17, 2024