Domains & App Shield

Domains and App Shield

Add custom domains with automatic HTTPS, and turn on the per-app web application firewall.

stackblaze domain

Alias: domains

Manages custom domains for the linked app. list (alias ls) shows each domain with its verification and certificate status; add prints the DNS records to create; verify checks DNS now; remove (alias rm) detaches a domain; status shows the app's hosts, whether each has TLS, and the project's wildcard domain.

usage
stackblaze domain [list]
stackblaze domain add <host> [--wait] [--timeout <seconds>] [--takeover]
stackblaze domain verify <host> [--wait] [--timeout <seconds>]
stackblaze domain remove <host> [-y]
stackblaze domain status [host]

domain add prints two records: a TXT record at _stackblaze-verify.<host> that proves you own the domain, and a CNAME from <host> to the app's platform URL. Once DNS verifies, the HTTPS certificate is issued automatically. A domain moves from waiting for DNS, to DNS verified, to issuing certificate, to active.

The platform re-checks pending domains every 5 minutes. verify checks right away, and --wait keeps checking until the domain is active. verify exits 0 only when the domain is active (DNS verified and HTTPS ready) and 1 while it is still pending, on an error, or when --wait times out, so scripts can test it. --json prints the document either way.

Several accounts can claim a domain that is not verified yet: the first claim whose TXT record verifies gets it, and the others are released. If another account verified a domain but no longer controls its DNS, add --takeover claims it; it moves to you once your TXT record is live and theirs has been gone for checks at least 10 minutes apart, so pass --wait --timeout 1800 or more.

FlagDescription
--waitadd, verify: keep checking until the domain is active (HTTPS ready)
--timeout <seconds>add, verify: maximum --wait time (default 600)
--interval <seconds>add, verify: seconds between checks while waiting (default 10)
--takeoveradd: claim a domain verified by another account that no longer controls its DNS
-y, --yesremove: skip the confirmation

Also accepts the scope flags (-p, --project, -e, --env, -a, --app) and the output flags (-o, --output, --json), plus --token, --api-url and --org. Common flags

Examples

terminal
stackblaze domain add www.example.com          # prints the DNS records to create
stackblaze domain verify www.example.com --wait
stackblaze domain add www.example.com --wait --timeout 900
stackblaze domain list
stackblaze domain remove old.example.com -y

stackblaze wafComing soon

Coming soon
The syntax below is final; these commands become available once App Shield is enabled on the platform.

App Shield is the per-app web application firewall. enable turns it on in detection-only mode (blocking stays on if it already was); disable turns it off. under-attack enable switches to blocking mode, and under-attack disable returns to detection-only.

usage
stackblaze waf [status]
stackblaze waf enable
stackblaze waf disable
stackblaze waf under-attack status|enable|disable

Also accepts the scope flags (-p, --project, -e, --env, -a, --app) and the output flags (-o, --output, --json), plus --token, --api-url and --org. Common flags

Examples

terminal
stackblaze waf enable
stackblaze waf under-attack enable
stackblaze waf status -o json

stackblaze cdn purge

Purges the edge (CDN) cache of the linked app's own public hostnames, so the next requests are served fresh from the app.

usage
stackblaze cdn purge

Also accepts the scope flags (-p, --project, -e, --env, -a, --app) and the output flags (-o, --output, --json), plus --token, --api-url and --org. Common flags

Examples

terminal
stackblaze cdn purge -a web