How to use Firewall

Learn how to redirect or block visitors based on the country they are in and the path they request.

Firewall rules let you control how visitors reach your site based on the country they are in and the path they request. Use them to send visitors to a regional site, keep a path available in some countries only, or block traffic you do not want to serve.

Firewall is available with the Advanced Hosting add-on and on Enterprise plans.

About firewall rules

A firewall rule combines an action with conditions:

  • Action is what happens on a match: redirect the visitor to a locale, another URL or path, or block the request.

  • Conditions match the visitor’s country, the requested path, or both. Each condition can be inverted, so a rule can also match everything except the countries or path you select.

Country conditions don’t apply to AI agents and link-preview bots (for example ChatGPT, Slack or Facebook previews), which fetch pages from data-center IPs. Search engine crawlers such as Googlebot are treated like regular visitors from their IP’s country.

Firewall rules apply to your published site, so publish your project after adding, editing or deleting rules.

Add a firewall rule

  1. Open your project and go to Site Settings → Hosting → Firewall.

  2. Click the Add button.

  3. Choose an Action: Redirect, Redirect to Locale, or Block.

  4. Enter the Path the rule applies to. Click the field to pick a path pattern and Framer inserts a template you can edit.

  5. Click the Country field, search for a country, and select it. Repeat to add more countries. Selected countries appear as chips you can remove individually.

  6. For a redirect, enter the Redirect To target, or select the locale to send visitors to.

  7. Click Add.

  8. Publish your project for the rule to take effect.

Use path patterns

The Path field offers the same patterns as redirects:

Pattern

Purpose

Example

Exact Path

Matches one path

/blog matches /blog only

Path and Subpaths

Matches everything under a path

/blog/* matches /blog/my-post and /blog/2026/update

Wildcard

Matches every path on your site

/*

Parameter

Captures a named segment you can reference in the redirect target

/blog/:slug captures my-post as slug

Learn more about path patterns and capture groups.

Available actions

  • Redirect sends visitors to another page.

  • Redirect to locale sends visitors to a different locale on your site. Visitors who are already browsing a different locale are not redirected.

  • Block does not send any content.

Inverting conditions

Every condition can be inverted:

  1. Hover the Path or Country label in the rule.

  2. Click the ⋯ menu.

  3. Choose Invert Condition.

The label changes to Path Is Not or Country Is Not, and the rule then matches everything outside the value you selected. In the rules list, inverted country conditions read as “All except” followed by the countries.

Manage firewall rules

Rules are evaluated in the order shown in the Firewall list.

  • Drag and drop rules to change their priority.

  • Open the ⋯ menu on a rule to edit or delete it.

When a rule matches several countries, the list shows the first three, followed by “+ 2 others” for the rest.

Still not sure how to set up a rule? Get in touch with us via our contact page for more help.

Updated

Your next idea starts here

GPT 6 Sol

Create personal portfolio

Build startup site

Launch landing page

Start company blog

Framer UI showing Pages, Layers and Assets panels titles
Framer UI showing Pages, Layers and Assets panels titles