Country blocking
Country blocking lets you block visitors by the country their IP address is in, or ask them to complete a Captcha Protection check first. You can set countries for your whole network, add more for one cluster, or set them for one Website protection domain. Domain owners can add their own countries in the owner area, if you allow it.
Your network-wide countries
Open Settings and click Manage country blocking on the Country blocking card. The All clusters tab applies to every cluster in your account, now and in future. A cluster's own tab can only add countries on top of those: countries for all clusters show as Set for all clusters and can only be changed on the All clusters tab.
Block covers every domain, including domains without Website protection and domains whose HTTPS is passed through. HTTPS on port 443 is stopped at the sentry's firewall, which only checks new connections, so it doesn't slow down your other traffic. Plain HTTP on port 80 is stopped by the sentry's web server instead, so certificate checks on port 80 always get through.
Captcha Protection check asks visitors to complete a quick browser check before the page opens. A check can only be shown on domains with Website protection. On domains without Website protection, a country set to a check is not checked or blocked. Use Block to cover every domain.
One domain's countries
Open the domain from Domains and go to the Countries tab. It shows every rule that applies to the domain: your network-wide countries, the domain's own, and any the domain owner added. Add countries for this domain only under This domain's countries. These are applied by the web server, so they need Website protection. They can't change a country your network-wide list already sets.
Log mode
Every new country starts in log mode: visitors from it are counted and logged as "would have blocked", but let through. Check what you see in Logs, then click Enforce to start blocking or checking. Back to log mode stops enforcing again without removing the country.
A country's log mode is separate from a domain's Website protection log mode. Once you click Enforce, a Block always blocks, even while that domain's Website protection rules are in log mode. An enforced Captcha Protection check follows the usual Captcha Protection rule: it is only logged while the domain's Website protection rules are in log mode. Under Attack still checks every visitor.
Never blocked by country
These are never blocked or checked by country: verified Identified traffic, your never-check addresses (on Settings › Captcha Protection), your own sentries, origin servers and cluster VIP, and your SSH allow-list.
Certificate checks over HTTP (ACME /.well-known/acme-challenge/ and /.well-known/pki-validation/ on port 80) are never blocked or checked by country, on every domain, with or without Website protection. DNS checks aren't affected either. Certificate authorities check domains from several countries, so a network-wide Block on a country they check from can stop certificates that are checked over HTTPS (TLS-ALPN, on port 443) from renewing, because HTTPS is blocked at the firewall. If a domain's certificates use TLS-ALPN, use HTTP or DNS checks instead, or don't block those countries. If the origin redirects certificate checks from HTTP to HTTPS, they're blocked the same way.
Domain owners
The permission Block or check visitors by country on their domain (domains with Website protection only) on Owner access is on by default. A domain owner then sees a Countries tab in the owner area, where they can add countries for their own site, choose Block or Captcha Protection check, and switch each country between log mode and enforced. They can't change or remove a country you set: it shows as Blocked by your host, Checked by your host or Logged by your host. If you untick the permission, their countries are paused until you allow it again.
Reports
Blocked visitors are logged with the reason country: and the country, for example country: CN (see Log reasons). Each Countries page shows how many visitors were blocked and logged in the last 24 hours. Countries are matched with a country database that's updated monthly.
Country blocking needs the latest sentry release: older sentries ignore it.