
Not every website needs to be accessible worldwide. Some businesses operate in specific regions, face regulatory restrictions, or simply want more control over who can access their content. However, Framer doesn't include built-in geographic restriction tools, which can make it difficult to manage access based on location.
If you need to filter visitors by country or region on your Framer site, Cloudflare's Web Application Firewall (WAF) provides a straightforward solution. This guide walks you through how to set up geo-blocking using Cloudflare WAF with Framer.

Controlling access based on geography can be an important consideration for businesses. Whether it's to reduce spam, meet legal requirements, or focus on a specific market, geo-blocking provides a way to manage traffic more effectively.

These are the most common reasons businesses choose to implement it:
When you connect your Framer domain to Cloudflare and enable Proxied mode, all traffic to your site passes through Cloudflare's network first. Cloudflare identifies each visitor's country using their IP address and checks it against your WAF rules. If the visitor's country is blocked, Cloudflare returns an error page before the request ever reaches your Framer site. If allowed, the request continues to Framer normally.
The key requirement is that your DNS must be in Proxied mode (orange cloud icon in Cloudflare). Without this, traffic goes directly to your Framer site and Cloudflare can't apply WAF rules.

Before you can use geo-blocking, your Framer domain needs to be connected to Cloudflare with Proxied mode enabled.
If you haven't already added your domain to Cloudflare:
Cloudflare will provide you with two nameservers (they look like kay.ns.cloudflare.com and ron.ns.cloudflare.com):
This can take anywhere from a few minutes to 24 hours to propagate, but typically happens within 1-2 hours.
Once Cloudflare confirms your nameservers are active:
Critical: The orange cloud (Proxied mode) is what enables geo-blocking. Without it, WAF rules won't work.


Finally, tell Framer about your custom domain:

Important note: When using Cloudflare as a proxy (orange cloud) to enable WAF/geo-blocking, don't follow the A records suggested by Framer or use "Auto Connect". In Cloudflare, create only two CNAMEs—@ and www pointing to your-subdomain.framer.app—with Proxy = Proxied. Cloudflare performs CNAME flattening at the apex, so you don't need A records. If you already had A records from a previous setup, delete them: pointing directly bypasses the proxy and breaks WAF functionality.
It's normal for the status in Framer → Domains to remain "Pending" even though the site works perfectly behind Cloudflare. Framer attempts to verify A records or unproxied CNAMEs, which is why it sometimes doesn't "see" the proxied configuration. If your site loads at your-domain.com and www.your-domain.com with the orange cloud, ignore this status: traffic is already passing through Cloudflare and WAF rules are being applied.
With your domain connected and proxied through Cloudflare, you can now set up geo-blocking rules.

To block specific countries (for example, China, Russia, and Iran):

Your rule is now active. Visitors from those countries will see a Cloudflare error page when trying to access your Framer site.
If you want to allow only certain countries and block all others:


This blocks everything NOT in your list, effectively creating a whitelist.
If you want to block entire continents:

Block multiple continents
The easiest way is to use Field = Continent, Operator = is in, and select multiple continents in the Value field.
After deploying your rules, you should verify they're working correctly.
The most reliable way to test:

Cloudflare logs all blocked requests:

If you want to test without actually blocking users:
The setup above covers most geo-blocking needs. However, if you need more advanced features like custom error pages, complex routing logic, or want to serve different content based on location, you'll need to set up Cloudflare Workers.
Advanced use cases that require Workers:
Setting up Workers requires technical knowledge of JavaScript, DNS configuration, and routing. If your team needs help implementing these advanced features or wants to explore more sophisticated geo-blocking setups, our agency specializes in Framer and Cloudflare implementations and can guide you through the setup process.
Rules aren't working at all
Cause: DNS isn't in Proxied mode (cloud is gray instead of orange).
Solution: Go to DNS → Records in Cloudflare and click the cloud icon to turn it orange (Proxied).
Some visitors from blocked countries can still access the site
Cause: Visitors using VPNs can bypass geo-blocking by appearing to be from a different country.
Solution: This is a limitation of all geo-blocking systems. You can add additional security layers like rate limiting or bot detection, but VPNs will always be able to bypass country-based restrictions.
Site is slow or timing out
Cause: Cloudflare's SSL/TLS settings might be misconfigured.
Solution: Go to SSL/TLS → Overview and ensure it's set to Full or Full (strict).
To block a country on your Framer site, first connect your domain to Cloudflare with Proxied mode enabled (orange cloud). Then go to Security → WAF → Custom rules in Cloudflare and create a new rule. Select Country as the field, is in as the operator, choose the countries you want to block, and set the action to Block. This works on Cloudflare's free plan and takes about 5 minutes to set up.
Yes, you can block multiple countries in a single WAF rule. When creating your rule in Cloudflare, select Country → is in and then click in the value field to select multiple countries from the dropdown list. All selected countries will be blocked by the same rule. You can block as many countries as needed, and the rule applies instantly once deployed.
No, Framer doesn't have built-in geo-blocking features. To block countries from accessing your Framer site, you need to use a third-party service like Cloudflare's WAF. This requires connecting your Framer domain to Cloudflare and configuring WAF Custom Rules. The good news is that Cloudflare's free plan includes geo-blocking capabilities, so you don't need to pay for this feature.
To whitelist specific countries (allowing only them and blocking all others), use Cloudflare's Expression Editor with inverse logic. Create a WAF rule with the expression (not ip.geoip.country in {"US" "CA" "GB"}) and set the action to Block. Replace the country codes with your desired countries. This blocks everything NOT in your list, creating an effective whitelist for your Framer site.
Geo-blocking can affect SEO if you block countries where search engine crawlers operate. Google's main crawlers typically come from the US, but they also crawl from other locations. To prevent SEO issues, modify your WAF rule to exclude verified bots by using the expression (ip.geoip.country in {"CN" "RU"} and not cf.client.bot). This blocks the countries but allows search engines to crawl your Framer site normally.
Yes, users can bypass geo-blocking by using a VPN to appear as if they're accessing your site from a different country. This is a limitation of all IP-based geo-blocking systems, not just Cloudflare or Framer. If you need stricter access control, consider combining geo-blocking with other security measures like authentication, bot detection, or rate limiting to create multiple layers of protection.
Yes, geo-blocking using WAF Custom Rules is available on Cloudflare's free plan. You can create country-based blocking rules without paying anything. Cloudflare's free plan includes enough WAF rules for most sites. However, some advanced features like custom response codes or Bot Management scores require paid Cloudflare plans (starting at $20/month for Pro).
To block an entire continent, create a WAF rule in Cloudflare and select Continent as the field instead of Country. Choose equals as the operator and select the continent you want to block (Africa, Asia, Europe, North America, South America, Oceania, or Antarctica). This blocks all countries within that continent with a single rule, which is more efficient than blocking countries individually.
Yes, but this requires setting up Cloudflare Workers, which is more advanced than basic WAF rules. With Workers, you can detect a visitor's country and return custom HTML content instead of Cloudflare's default error page. This allows you to explain why access is restricted or redirect users to alternative resources. If you need this functionality, it requires JavaScript knowledge or professional implementation assistance.
Geo-blocking rules in Cloudflare typically take effect within 1-2 minutes after deployment. However, if you just connected your domain to Cloudflare, you may need to wait for DNS propagation (up to 24 hours, though usually 1-2 hours). Once your DNS is pointing to Cloudflare with Proxied mode enabled, any WAF rules you create apply almost immediately to all incoming traffic.
Implementing geo-blocking on your Framer site using Cloudflare WAF provides straightforward control over who can access your content based on geographic location. By connecting your domain to Cloudflare and configuring simple WAF rules, you can block specific countries, create whitelists, or filter traffic by continent—all without writing code or paying for premium features.
The basic setup works for most use cases, from reducing spam to meeting regulatory requirements. Your Framer site remains fast and functional while Cloudflare handles the geographic filtering at the network edge. For businesses needing more advanced features like custom error pages or complex conditional routing, Cloudflare Workers provide additional capabilities.
If your team needs help implementing geo-blocking, evaluating whether it's the right solution for your business, or setting up advanced customization, our agency specializes in Framer and Cloudflare implementations and can guide you through the entire process.

Learn how to link buttons to specific sections across pages in Framer. Set up Scroll Targets for seamless cross-page navigation in minutes.

Optimize bandwidth in Framer with practical strategies—cut costs and boost performance without upgrades.

Learn how to send Framer forms to multiple email addresses using native Framer form settings. Simple step-by-step guide.