Problem

When a domain alias uses a wildcard pattern (e.g. *.tugboatqa.com) that happens to match a registered domain's canonical hostname, the exact hostname match short-circuits alias negotiation — the alias environment will never apply to that hostname. There is currently no feedback about this, so admins may not realize the overlap.

Solution

After a successful save in the alias form, if the alias has a wildcard pattern with a non-default environment, convert the pattern to a regex and check it against all domain canonical hostnames. If any match, display a warning message. The alias is still saved — this is informational only.

Default environment aliases are excluded since the exact hostname resolves to the canonical domain anyway.

Warning message

The pattern matches the canonical hostname example.com. The alias environment will not apply to that hostname.

Issue fork domain-3578599

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

  • mably committed e243045f on 3.x
    task: #3578599 Warn when wildcard alias matches a registered domain...
mably’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.