Firewall
By Steven Van ·
Rules match on country and path, and need the Advanced Hosting add-on or an Enterprise plan.
Each rule pairs an action (Redirect, Redirect to Locale, or Block) with conditions on country and path. Any condition can be inverted, so a rule can match everything except the countries or path selected. Paths use the same patterns as redirects: exact paths, a path and its subpaths, a wildcard for the whole site, and named parameters. Redirect to Locale sends visitors to a different locale on sites that use localization. It leaves alone visitors who are already browsing another locale.
To add a rule, open Site Settings → Hosting → Firewall, click Add, and publish the project, since rules only apply to the published site. Rules are evaluated in the order listed and can be reordered by drag and drop. Country conditions do not apply to AI agents and link-preview bots such as ChatGPT, Slack or Facebook previews. Search crawlers such as Googlebot are treated like regular visitors from their IP's country.
