Website URL restricts based on Geolocation

Dear Team

             my website have static & dynamic  pages i want my static page should work in all countries except dynamic pages. Dynamic pages should work in allowed countries is static page is the dynamic Page

Please help me Team

Hello, you could make a WAF rule under the Security menu for this.

Setup the first filter:
Field: Country
Operator: Does not equal (Or “is not in” if you want multiple countries to be able to access your dynamic page(s))
Value: Choose the country / countries you want to allow to access your page

Next to the Value field click on the And button to setup your second filter:
Field: URI Full
Operator: Contains
Value: Type the part of your dynamic’s pages URL that is always the same, which is, based on your example.

Action: Block

This will result in that if someone will try tro to visit that specific and the visitor is NOT from the allowlisted (yours) country, Cloudflare will block them.

1 Like