Edgeweir
Sites

Domains and unknown hosts

The Domains tab, domain forms and precedence, internationalized names, DNS checks, unknown hosts and node IP access, scan protection, CNAME prefixes.

Concepts

TermDefinition
Exact domaina.com, www.a.com: this host name only.
Wildcard domain*.a.com: any host name one label below a.com (x.a.com), not deeper ones (y.x.a.com) and not a.com itself.
Suffix domain.a.com: host names at any depth below a.com (x.a.com, y.x.a.com), not a.com itself.
Pattern domain~ and a regular expression matched against the whole lowercase Host (without port).
Internationalized domain nameA domain with non-ASCII characters (bücher.example, 中国.example), stored and matched as Punycode (xn--…).
Unknown hostThe request's Host belongs to no site of the cluster, or its site is not bound to the port the request arrived on.
Node IP accessA request whose Host is an IP address (203.0.113.5, [2001:db8::1]) or empty.
Default siteAn enabled site of the cluster that unknown hosts or node IP access can be handed to.
CNAME prefixThe first label of the CNAME target <prefix>.<cluster domain> of a site or L4 app.
Edge addressesThe primary scheduling addresses of the cluster's online active nodes (configured scheduling addresses, else the public addresses the nodes report): the addresses the domains' A / AAAA records should point to.
Pointing stateHow the console's lookup of a site domain compares with the addresses of the cluster's nodes, see pointing states.

The Domains tab

Page: Sites → (site) → Domains (/sites/<site ID>/domains), three cards from top to bottom:

CardContent
CNAME target or Edge addressesCNAME target when the cluster has DNS steering, else Edge addresses; below it the pointing state of every domain, see CNAME target and edge addresses
DomainsThe site's domain list and the input to add domains
PortsThe HTTP and HTTPS listener ports the site is bound to, see site ports

Editing domains

  1. In the Domains card, type one or more domains into the input (separated by spaces or commas; commas inside a pattern do not separate) and press Enter or click Add domain to add them to the list. Forms: domain forms.
  2. Click the delete button (Remove) next to a domain to take it off the list; the last domain cannot be removed.
  3. Click Save. Domains still in the input and not added yet are saved too.
  • Saving is PATCH /api/v1/sites/{id} (domains replaced as a whole): the cluster publishes a new configuration revision (reason "Site {site} updated") and the audit entry "Site updated" is written; the notice "Saved" follows the nodes, see site enabling.
  • The browser checks the form before adding a domain to the list and shows "Invalid domain: …" for a malformed one. A domain the list already holds (compared in the stored form: Unicode and Punycode count as the same) is not added again.
  • On a site with a certificate, new domains must be covered by one of the site's certificates. When the first certificate is one the console requested with automatic renewal on, it takes the new domains and is reissued ("Certificate … is being reissued for the new domains"); otherwise saving fails with "Certificate domains do not match the site or DNS zone: …" (CERTIFICATE_DOMAIN_MISMATCH). See adding domains to an HTTPS site.
  • Removed domains also leave the HTTPS Domains not redirected.

CNAME target and edge addresses

StateCardContent
The cluster has a DNS binding (Automatic or Manual mode)CNAME target<CNAME prefix>.<cluster domain> with a copy button; a status badge (table below); with resolution lines in the binding, one row per line: the line name and its target (<line name>.<CNAME prefix>.<cluster domain> with Keep per-site line targets, else <line name>.<cluster domain>); Regenerate, Customize and the old names in their transition, see CNAME prefixes
The cluster has no DNS bindingEdge addressesThe cluster's edge addresses, each marked A or AAAA, with copy buttons. "No public address" when online nodes report no public address, "No online nodes" when no node is online
CNAME target badgeCondition
PublishedAutomatic mode; the cluster's latest DNS revision is applied at the DNS provider and holds the site's CNAME record
No healthy nodesAutomatic mode, published, but the cluster's all-lines record holds no A / AAAA record (every node removed by health checks, see health removal and repair)
PendingAutomatic mode; the DNS revision is not applied yet, or mass removal protection holds the CNAME record back
ManualManual mode: the console writes no records; create the records listed on the DNS tab of Clusters & nodes, see manual mode
  • CNAME target refreshes every 15 seconds and the pointing states are checked every 30 seconds; Check again at the card's top right checks both at once.
  • In the Edge addresses card each checkable domain also gets a command that bypasses DNS and asks the first edge address directly, for example curl -sI --resolve www.example.com:443:203.0.113.5 https://www.example.com/. It uses 443 and https when the site's certificate covers the domain, else 80 and http; a wildcard domain uses the fixed name edgeweir-check.<domain> below it.

Pointing states

The console looks up the A and AAAA records of every domain with the system DNS resolvers of its host (3 seconds a try, 2 tries) when asked, and compares them with the addresses of the cluster's active nodes (configured scheduling addresses or reported public addresses, backup addresses and offline nodes included):

StateMeaningCounted in DNS pointed
Points hereEvery address it resolves to belongs to an active node of the clusterYes (pointed)
Points elsewhereAt least one address belongs to no active node of the cluster (say it still points to the origin or a former CDN)Yes (not pointed)
Not resolvedNo A or AAAA record (a name that does not exist included)Yes (not pointed)
Not checkedThe lookup failed (a timeout or the like), or no node address of the cluster is knownYes (not pointed, not listed as failing)
Not checkableA . suffix or pattern domain: it names no single hostNo
  • A wildcard domain *.example.com is looked up as the fixed name edgeweir-check.example.com.
  • Behind a CNAME, the addresses the chain finally resolves to must belong to the cluster's nodes as well.
  • A resolver's cached answer (also "no such name") holds until its TTL ends: right after a DNS change Check again may still show the old result.
  • Pointing states are advisory: they do not decide whether nodes serve a domain.

Domain forms

FormExampleMatchesDoes not match
Exactshop.example.comshop.example.comwww.shop.example.com
*.*.example.comimg.example.coma.img.example.com, example.com
..example.comimg.example.com, a.img.example.comexample.com
~pattern~(www|m)\.example\.comwww.example.com, m.example.comwwwx.example.com, www.example.com.evil
  • Domains are entered on the site's Domains view (see editing domains) or in the New site dialog; when creating a site, one per line or separated by spaces or commas (commas inside a pattern do not separate).
  • Host names are case-insensitive and stored in lowercase; a trailing ., a port, and the scheme and path of a pasted URL are removed.
  • A site has 1–50 domains, at most 10 of them patterns. A name in one form belongs to one site only (*.a.com and .a.com are different forms and may belong to different sites); a taken one shows "Domain already in use: …" (DOMAIN_IN_USE).
  • In the list, wildcard, suffix and pattern domains carry the badges Wildcard, All subdomains and Pattern.

Internationalized domain names

  • Unicode domains can be entered as they are. The console converts them to Punycode by UTS #46 (nontransitional processing: ß and ς stay as they are) and stores that, for example bücher.example as xn--bcher-kva.example; Punycode can be entered directly too.
  • The list and the site list show Unicode, with the Punycode on hover. Only labels in one script (or Latin with Han, kana, Bopomofo or Hangul) are shown in Unicode; labels that mix scripts (say a look-alike with Cyrillic letters among Latin ones) stay in Punycode.
  • The site search finds both forms, and part of a Unicode name too (büch).
  • Names UTS #46 refuses (for example breaking the bidi rules, holding disallowed characters, or labels that start or end with - once decoded) show "Invalid domain: …" (DOMAIN_INVALID).
  • Browsers send the Host in Punycode: patterns match the Punycode form.

Pattern domains

ItemRule
MatchThe whole lowercase Host, as ^(?:pattern)$: no ^ or $ needed
SyntaxThe subset of the matches operator of rule expressions: printable ASCII, at most 256 characters; . matches any one character
LettersLowercase only (escapes such as \d, \W, \x2A aside): the Host is lowercased
RepetitionAt most two repeating quantifiers: *, +, {n,} and {n,m} with m above 1 (a fixed count {n} does not count)
BranchesThe alternatives of each group (and of the whole pattern) and the optional parts (?, {0,1}, 2 each) multiply to at most 16; (a|b)(c|d)e? makes 2 × 2 × 2 = 8 (groups take no quantifier)
Not allowed", \\, whitespace, a comma outside {n,m} (a Host holds none)

Precedence

A Host goes to one site only, found in this order (the first hit wins):

  1. An exact domain.
  2. A *. wildcard (the Host without its leftmost label).
  3. A . suffix: from the Host without its leftmost label, dropping one more label each time, so the longer suffix matches first.
  4. A pattern: by site creation time, within a site in the order its domains were saved, the first pattern that matches.

Example: site A has .example.com, site B .img.example.com, site C *.example.com. x.example.com goes to C (*. comes before .), a.img.example.com to B (the longer suffix), a.b.example.com to A.

A Host that is an IP address or empty (node IP access) matches exact domains only; a Host longer than 253 characters matches no pattern domain.

Purges find sites by Host as nodes do: among each cluster's enabled sites, with the same precedence; when several clusters serve the host, each one's site is purged. Prefetches and sitemap prefetches go to one cluster only: that of the site the same precedence picks among the sites of every cluster, disabled ones included (say an exact domain in one cluster over a suffix or pattern domain in another). Its nodes fetch from the origin of the site they route the Host to. When only a disabled site's domain matches (for prefetches: in that cluster), the console says the site is disabled.

Limits of suffix and pattern domains

ItemBehavior
Launch checkThe Domains view and the launch check show Not checkable; they do not count towards DNS pointed N/M
CertificatesNot counted for "The certificate covers every domain". One-click HTTPS asks for *.a.com for .a.com (DNS-01 only, covering one level); patterns get no name, and a site with patterns only shows "The site has only pattern domains: no name to issue for"
HTTP-01Answered for exact domains only: hosts matched by a suffix or pattern cannot be issued for by HTTP-01
HTTPSHandshakes complete only for host names the certificate covers (the same name, or *. one label up); other names abort the handshake
Bulk redirectsA source's host must be an exact domain or one label below a *. domain; hosts only a suffix or pattern matches are refused with BULK_REDIRECT_HOST_UNKNOWN
HTTPS redirectDomains not redirected lists exact and *. domains only; Force HTTPS does not redirect suffix or pattern hosts the certificate does not name (their handshake would fail)
PortsA site not bound to the port a request arrived on handles it as an unknown host. In a cluster with suffix or pattern domains or a default site, such a request gets the server-level settings (HTTP/2, compression, ciphers) of the default site (when unknown hosts are handed to it and it listens on that port) or the node's defaults; otherwise it may get those of another site on that port whose *. domain matches the host
Purge pathsA path alone expands to URLs on the exact domains only

Unknown hosts and node IP access

  1. Open Clusters & nodes, pick the cluster and switch to the Settings tab.
  2. In the Unknown hosts card, choose the handling of Unknown domains and of Node IP or no Host.
  3. With Hand to the default site, choose an enabled site of this cluster in Default site; turn on Default site's certificate for unknown SNI if needed.
  4. Click Save. The console publishes a configuration revision of the cluster (reason "Unknown host settings updated").
HandlingHTTPHTTPS
Unknown host page (404, default)The platform's "unknown host" error page, X-Edgeweir-Error: unknown-hostUnknown SNI aborts the handshake; connections without SNI complete with the node's health certificate, and a Host that is an IP or empty gets 421
Close the connection (444)Nothing is returned: the connection is closed (curl shows Empty reply from server)The same (the handshake still follows the SNI)
Hand to the default siteThe request is served with the default site's settings (origins, cache, rules), Host unchangedUnknown SNI aborts the handshake unless Default site's certificate for unknown SNI is on, which completes it with the default site's certificate; connections without SNI complete with the health certificate and go to the default site
  • Domains of disabled sites still get the disabled page (503), never the default site; when an enabled site's *., suffix or pattern domain also matches the host, that site serves it.
  • A request without a Host (HTTP/1.0) is node IP access, even though the default site takes the listener's default server.
  • While the default site is disabled, requests handed to it get the unknown host page and the card shows "Default site disabled; the unknown host page is used"; deleting the default site clears it from the setting.
  • When the default site is not bound to the port the request arrived on (site ports), the unknown host page answers.
  • The default site must be an enabled site of this cluster (DEFAULT_SITE_INVALID); Default site's certificate for unknown SNI needs a default site with a certificate (DEFAULT_SITE_CERTIFICATE_REQUIRED).
  • With Hand to the default site, nodes answer the requests handed to it with the default site's HTTP/2, compression and cipher settings (requests without a Host with the node's defaults).
  • Requests handed to the default site keep their Host, and their cache key always holds it (also where the site's cache key leaves the host out): no Host can write into the cache the default site's visitors read.
  • With Force HTTPS on the default site, handed requests get 503 while it has no certificate; they are redirected to HTTPS only with Default site's certificate for unknown SNI on and a certificate that names the host, and otherwise answered over HTTP.
  • Default site can be searched by name or domain.

Scan protection

FieldValuesDefaultEffect
Scan protectionOn / offOffCounts every client's requests to unknown hosts and by node IP
Requests in 60 seconds over10–10000100More than this within 60 seconds of the first request: the next one bans
Ban seconds60–864003600How long the ban lasts
  • Counted whatever the handling (handing to the default site included), per client IP (IPv4 by address, IPv6 by /64); where the client IP comes from: client IP.
  • Behind a load balancer or proxy, first set Client IP to PROXY protocol, or to Trusted proxy header with the proxies' addresses in Trusted CIDRs; otherwise the load balancer's address is counted and banned, and every client behind it is refused.
  • The ban is global (scope platform): every site of the node answers 403 (X-Edgeweir-Error: ip-banned). It is listed under IP lists & bans → Bans with the reason "Unknown host scan" and the trigger "Unknown host requests", and shared with the other nodes by the "share automatic bans" setting, see bans.
  • Addresses of allow entries in platform IP lists and the cluster's trusted proxies are not counted; loopback addresses are never banned; nodes' kernel bans never drop their cluster's trusted proxies.
  • A ban that covers another cluster's trusted proxy applies on the node that made it only: it is not shared with other nodes.
  • A client whose ban was lifted is banned again if it keeps scanning.
  • Connections aborted during the TLS handshake (unknown SNI) are not counted.

CNAME prefixes

Once the cluster has DNS steering, the CNAME target of a site or L4 app is <CNAME prefix>.<cluster domain>.

ObjectPrefix
New sites and L4 apps8 random characters: a lowercase letter, then lowercase letters or digits
Sites and L4 apps from before the upgradeTheir UUID: their CNAME target does not change

Regenerate and customize

  1. Open the CNAME target card on the site's Domains view, or CNAME target on the L4 app's page.
  2. Click Regenerate and confirm ("Regenerate the CNAME prefix?", "The old name keeps resolving for 24 hours") to get a new random prefix, or click Customize, fill in CNAME prefix and click Save.
  3. The console shows "CNAME prefix changed". In Automatic mode it publishes a DNS revision of the cluster at once (reason "CNAME prefix of … changed"); in Manual mode it writes no records: create the new name from the records the DNS tab lists.
  4. Point the CNAME records of the domains at the new target. The old name is shown struck through with "Resolves until …".
RuleDetails
Format1–30 lowercase letters, digits or -, not starting or ending with - (uppercase is lowered)
UniqueUnique across all sites and L4 apps; an old prefix of another object still in its transition is taken too
Reservedall, all-<digits>, and every all-lines record name and line name of the clusters' DNS bindings
ConflictCNAME_PREFIX_CONFLICT ("CNAME prefix … is taken or reserved"); a malformed prefix shows "1–30 lowercase letters, digits or -, not starting or ending with -" under the input, and the API returns a 400 validation error; a UUID is accepted only as the object's own prefix from before the upgrade (its current prefix or an old one in its transition), any other UUID is CNAME_PREFIX_INVALID ("Invalid CNAME prefix …")
Records already in the zoneIn Automatic mode a custom prefix whose <prefix>.<cluster domain> (with Keep per-site line targets also <line name>.<prefix>.<cluster domain>) already holds a record in the DNS provider's zone that the cluster does not manage is CNAME_PREFIX_CONFLICT too; not checked when the zone cannot be read within 15 seconds
TransitionThe old prefix keeps resolving for 24 hours: the DNS plan keeps both CNAMEs (and the old name's line targets with Keep per-site line targets); afterwards the per-minute DNS job deletes the old name, and in Automatic mode publishes a DNS revision (reason "Replaced CNAME prefixes expired"); in Manual mode delete the old record yourself
Names never publishedIn Automatic mode a prefix never written to the DNS provider (say the zone could not be read when it was saved, and syncing then failed on a record already there) is not kept when replaced: it leaves the plan at once
Taking backThe object can take its old prefix back during the transition: click Take back next to the old name, or fill it in under Customize; the UUID prefix from before the upgrade can be taken back with Take back too
Auditsite.cname_update, l4.cname_update (from, to)

Saving a DNS binding whose line name equals a prefix (old prefixes in their transition included) returns DNS_BINDING_CONFLICT.

Node requirements

CapabilitySettings that need it
domains-v2A site (disabled ones included) has suffix or pattern domains
unknown-host-v1The unknown host settings are not the defaults (a handling other than the unknown host page, or scan protection on)

While an active node of the cluster lacks domains-v2, the Domains view and the New site dialog show "Some nodes in the cluster do not support suffix and pattern domains"; while one lacks unknown-host-v1, the Unknown hosts card shows "Some nodes in the cluster do not support it". Service accounts and background tasks get NODE_CAPABILITY_REQUIRED. Upgrading nodes: node upgrades.

ChangeHow it applies
Domains, unknown host settings other than the default site, scan protectionHot update
Every pattern domain added or removed (disabled sites' too), the first suffix domain added or the last removed, domains of sites with TLS settings, turning Hand to the default site on or off, the default sitenginx reload (server_name, default_server or the size of the regex cache change); open connections are kept

API

OperationMethod and path
Change a site's domainsPATCH /api/v1/sites/{id} ({"domains": ["a.com", "*.a.com"]}, replaced as a whole)
Read the CNAME targetGET /api/v1/sites/{siteId}/cname (target, mode, published, healthy, lines, retired; target is null without a DNS binding)
Launch check (edge addresses, pointing states, certificate coverage)GET /api/v1/sites/{id}/launch
Whether nodes support suffix and pattern domainsGET /api/v1/sites/{id}/features (domainsV2)
Read the unknown host settingsGET /api/v1/clusters/{clusterId}/unknown-hosts
Save the unknown host settingsPUT /api/v1/clusters/{clusterId}/unknown-hosts
Change a site's CNAME prefixPUT /api/v1/sites/{id}/cname-prefix ({"prefix": "shop"}; without prefix a new random one)
Change an L4 app's CNAME prefixPUT /api/v1/l4-apps/{id}/cname-prefix

Fields: API reference. A read-only AccessKey can call GET only. Service accounts can call only GET /sites/{siteId}/cname and GET /sites/{id}/launch (sites:read).

Troubleshooting

SymptomCauseFix
Saving domains shows "Invalid domain: …" (DOMAIN_INVALID)A Unicode name UTS #46 refuses, or a pattern with uppercase letters, ", whitespace or a comma, more than two repeating quantifiers, branches multiplying to more than 16, or outside the syntax subsetCorrect the name; write the letters of patterns in lowercase; enter several domains separately; use fewer * or + quantifiers and | or ? branches, or a suffix domain
Force HTTPS does not redirect a suffix or pattern hostThe site's certificate does not name the hostUse a certificate that names it
x.a.com goes to another siteAnother site has x.a.com, *.a.com or a longer suffixCheck the sites' domains against the precedence
HTTPS handshakes fail below a suffix domainThe certificate covers one level (*.a.com); deeper host names are not in itUse a certificate covering the deeper host names that need HTTPS, or exact domains
Unknown domains get no response at allUnknown domains is Close the connection (444)Switch to Unknown host page (404)
A client suddenly gets 403 ip-bannedScan protection banned the addressLift it under IP lists & bans → Bans, or add the address to a platform allow list
The old name stopped resolving after a prefix changeThe 24-hour transition is overPoint the domains' CNAME records at the new target
Saving domains shows "Domain already in use: …" (DOMAIN_IN_USE)A name in that form already belongs to another siteRemove it from that site, or use another form (*.a.com and .a.com may belong to different sites)
Saving domains shows "Certificate domains do not match the site or DNS zone: …" (CERTIFICATE_DOMAIN_MISMATCH)The site's certificate does not cover the new domains and cannot grow by them (an uploaded certificate, automatic renewal off, a wildcard for an HTTP-01 certificate, a name outside a DNS-01 certificate's zone, or more than 100 names)Upload or request a certificate covering the new domains first, see adding domains to an HTTPS site
Saving suffix or pattern domains shows "Some nodes in the cluster do not support suffix and pattern domains"An active node of the cluster lacks domains-v2Upgrade the nodes, see node upgrades
A domain shows Points elsewhereIt still resolves to the origin, a former CDN or another address outside the clusterPoint its A / AAAA records at the Edge addresses, or its CNAME at the CNAME target
A domain shows Not resolvedIt has no A or AAAA recordAdd the records; right after adding them, wait for resolver caches to expire and click Check again
A domain shows Not checkedDNS lookups on the console's host time out or fail, or no node address of the cluster is knownCheck DNS resolution on the console's host; make sure nodes are online and report public addresses, or configure scheduling addresses
CNAME target stays PendingThe DNS revision could not be applied at the provider, or mass removal protection holds it backSee the DNS revisions on the DNS tab of Clusters & nodes, see DNS revisions and rollback
CNAME target shows No healthy nodesEvery node of the cluster is removed by health checksCheck the nodes, see health removal and repair
Edge addresses shows "No public address"Online nodes report no public address and have no scheduling addressesConfigure scheduling addresses for the nodes, see scheduling addresses and backup IPs
Saving the unknown host settings shows "The default site must be an enabled site of this cluster" (DEFAULT_SITE_INVALID)The default site is in another cluster or disabledChoose an enabled site of this cluster
Saving the unknown host settings shows "The default site has no certificate" (DEFAULT_SITE_CERTIFICATE_REQUIRED)Default site's certificate for unknown SNI is on and the default site has no certificateGive the default site a certificate first, or turn the switch off
Edit on GitHub

On this page