Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.6.17 Update released for Drupal core (10.6.17)! Release: Drupal 11.3.17 Update released for Drupal core (11.3.17)! Release: Drupal 11.4.7 Update released for Drupal core (11.4.7)! Release: AI (Artificial Intelligence) 1.3.14 Minor update available for module ai (1.3.14). Release: AI (Artificial Intelligence) 1.4.9 Minor update available for module ai (1.4.9). Release: Modeler API 1.1.7 Minor update available for module modeler_api (1.1.7). Release: Field Validation 3.0.0-rc2 New release candidate for module field_validation (3.0.0-rc2). Release: VWO 8.x-3.0 Major update available for module vwo (8.x-3.0). Usage Milestone: Easy Email Module easy_email crossed 10,000 active installs. Module Revived: Commerce Stripe 2.2.2 Module commerce_stripe updated after 6 months of inactivity (2.2.2).

LocalGov Microsites Domain Alias

No security coverage

Part of the Localgov ecosystem · 79 projects

View on drupal.org

One microsite, reachable in every environment

LocalGov Microsites: Domain Alias automatically creates one Domain Alias per configured environment for every microsite domain on a LocalGov Microsites platform. Each microsite becomes reachable under a predictable hostname in every environment — local, stage, production — from the moment it is created, long before its real domain is pointed at the platform.

For a microsite www.my-site.se on a platform whose controller domain is controller.example.com:

  • www-my-site-se.stage.controller.example.com — stage (no configuration needed)
  • www-my-site-se.sites.example.com — production behind a base domain of your choice
  • www-my-site-se.myproject.lndo.site — local development with Lando

The production alias doubles as a go-live tool: build and verify content on
production — optionally behind basic auth at the ingress — and simply repoint
the real domain when the site is ready.

Why this module exists

On a LocalGov Microsites platform, the domain is the microsite: the site, its admin UI and every editor link resolve through the hostname on the microsite's domain record. That makes the hostname a hard dependency, and in real projects it is rarely ready when you need it.

Microsite owners shouldn't have to wait for DNS. A microsite is usually created long before its real domain (say www.my-site.se) points at the platform — DNS, certificates and hostname config often sit with a third party and take days or weeks. This module generates a temporary alias on a domain the platform already controls the moment the microsite is created, so administrators get a reachable site from day one and can start building content immediately. The real domain is added later, with nothing else to change.

One microsite, every environment. Domain records live in the database, so a copy of production carries production hostnames everywhere else. Instead of hand-editing domains or maintaining local overrides after every database refresh, this module keeps one alias per configured environment alongside the production domain — pull production down to stage, preprod or Lando/DDEV and every microsite is immediately reachable under a predictable hostname.

Features

  • Fully managed aliases — created when a microsite domain is created, replaced when its hostname changes (whichever form or code performs
    the save), removed when the microsite is deleted.
  • Environment configuration UI — add any number of
    environments with an optional base domain or a full {slug}
    pattern; saving regenerates every microsite immediately. Generated DNS
    instructions show exactly which wildcard records to create.
  • Local development aware — pick Lando, DDEV or a custom
    pattern; local aliases are namespaced by the tool's project name
    (LANDO_APP_NAME / DDEV_PROJECT) so a single wildcard
    entry in your tool's config serves every microsite.
  • Editor visibility — the aliases appear as clickable links
    on each microsite's Domain settings tab, and a views field adds an
    "Environments" dropbutton to the microsites overview.
  • Operations supportdrush lmda:regenerate
    for bulk regeneration, status report entries that warn about a missing
    default domain or microsites lacking aliases, and a route-cache decorator
    that keeps per-domain front pages from bleeding between domains.

Requirements

Infrastructure. This module creates the Domain Alias records inside Drupal — it does not make the hostnames resolve. For each configured environment you also need:

  • DNS pointing at the environment, normally a wildcard record (*.microsites.example.com). The module generates the exact records to create.
  • A web server / hosting platform that accepts those hostnames — a wildcard virtual host, or the domains registered with your host if it requires that (Platform.sh, Acquia, Pantheon and similar).
  • A TLS certificate covering them, typically a wildcard certificate.
  • If your settings.php sets trusted_host_patterns, a pattern that matches the generated aliases.

Post-installation

Configure environments at Configuration → Domains → Microsite domain
aliases
(/admin/config/domain/microsite-alias). On platforms
where microsites are created at runtime, protect the domain and alias config
entities from drush config:import — for example with
Config Ignore; see
the README for the recommended patterns and first-import ordering.

Credits

Developed by Digitalist for
LocalGov Drupal microsites platforms.

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
2
Tracked since
Sep 2026
Latest release
5 hours ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.x-dev Dev 11 Sep 16, 2026
1.0.0-alpha1 Pre-release 11 Sep 16, 2026