Skip to Content
Browse documentation

Restrict Common Domain Names

Maintain the Eenos commondomains file to reject exact restricted names during supported account-creation and domain-validation workflows.

Use the common-domain restriction file to prevent supported provisioning workflows from accepting domain names that your hosting service should not provision.

Restriction file

/usr/local/eenos/etc/commondomains

Maintain this file as a server administrator. Back up an existing file before editing it; keep the backup outside any public website directory and preserve its ownership and permissions when restoring.

Add restricted names

Open the file with your normal administrator editor and add one full domain name per line. For example:

example.com
example.org

These are illustrative names; add the actual names required by your policy. Preserve existing entries and end the file with a newline. Save as plain UTF-8 text without a byte-order mark.

Use lowercase ASCII domain names with no scheme, URL path, port or trailing dot. For an internationalized name, use the corresponding canonical IDNA ASCII form used by the provisioning workflow.

Matching behavior

The reader strips surrounding whitespace, ignores empty lines and deduplicates identical entries. The restriction check then uses exact membership in that list.

  • example.com does not automatically match www.example.com or another subdomain. Add each required name explicitly.
  • *.example.com is not a wildcard rule, and .com is not a top-level-domain blocking rule.
  • Entries are not regex patterns. Comment lines have no special parser syntax; keep this file to domain entries rather than inline comments.
  • File entries are not lowercased or IDNA-normalized by the restriction helper. Use canonical entries instead of relying on case variants to match.

The shared account-creation backend canonicalizes its proposed main domain before checking the list. Other callers can normalize inputs differently, which is another reason to verify the workflow you use.

Where the policy applies

The reviewed WAP and RAPP account validators, WAP/Reseller API account-domain validators and shared account-creation backend consult the restriction helper. A WAP DNS validation path also checks it.

Not a universal website block

The reviewed UAPP addon/subdomain validation paths do not call this restriction helper. Do not assume the file blocks every website, alias, migration or custom integration path. Verify each workflow you intend to govern.

This is a provisioning validation policy. It does not suspend or remove existing hosting accounts, alter DNS answers, filter HTTP traffic or block mail senders. For SMTP sender restrictions, use the separate Exim access-list controls.

Verify the change

The helper reads the file during validation; changing this list does not require a DNS, webserver or mail-service rebuild. Check the saved file and test rejection through the specific supported workflow in a designated development environment. Do not submit an allowed-domain provisioning request merely to see whether the policy works: it can create a real account.

A rejected account-domain validation should report that the domain is restricted. Also verify the corresponding subdomain separately if it is part of your policy. Preserve a working backup for rollback and repeat the check after relevant software changes.

If an entry is not enforced, check canonical spelling, file readability and whether that workflow uses the helper. A missing or unreadable list is treated as empty by its reader; that is not proof the policy loaded successfully.

Built-in restrictions

The helper always adds localhost. It also restricts a proposed name containing eenos (case-insensitively) when /etc/eenos_domains is absent. That built-in rule is separate from your explicit file entries. Removing an explicit entry cannot override it; do not change the marker as an incidental troubleshooting step.

Remove a restriction

Remove only the intended domain's line, preserve the remaining policy and save. Future checks through supported paths then use the updated list, subject to built-in restrictions. Existing accounts remain unchanged.

See WAP account creation and the WAP createacct API for related provisioning behavior.