PrestaShop module 1.6 to 9.x
Choose which countries can enter your shop
Block or redirect visitors country by country, right after install. Search engines always get through, so your SEO stays intact.
- 0
- files to upload: ready right after install
- 3
- geolocation sources, from CDN to API
- 6
- back office languages, multistore
01 - How it works
How does it work?
Three steps, no database to install
Choose the countries
In the Countries tab, one click allows or forbids a country and saves it instantly. Search and sorting find any country in a moment.
The module locates each visitor
It first reads your CDN's country header, then a local GeoLite2 database if you enable it, and an online service as a last resort. If the country remains unknown, access is left open.
Each country gets its own response
An information page with your logo, or a redirect to the URL of your choice, per country and per language, with a 403 or 503 code.
02 - Benefits
What makes the difference
Designed never to cost you a sale or a Google ranking
- Ready right after install
- No file to upload, no account to create, no server extension.
- Bots never blocked
- Google, Bing, AI bots and social media previews are recognized locally, with no external service.
- Never closed by mistake
- If geolocation fails, access stays open (fail-open, can be turned off).
- CDN compatible
- The Cloudflare or CloudFront country header is read first, and so is the visitor's real IP behind a proxy.
- Automatic GeoLite2 database
- With a free MaxMind key, the module downloads the database and updates it every week.
- Redirect by language
- One URL per country and language, or a global redirect for all blocked countries.
- IP lists
- Addresses that are always allowed (bank, service provider) or always denied, whatever their country.
- Proxy, VPN and Tor
- An option to refuse visitors who hide their country.
- Multistore
- Settings per shop, per group or by default, with a banner that shows what you are editing.
- Self-check
- The module shows the country detected for your own connection, so you know it works.
03 - Comparison
This module or native geolocation?
PrestaShop can restrict countries, but that is where it stops
| Capability | Native PrestaShop | This module |
|---|---|---|
| Works right after install | No, GeoLite2 database to upload by hand | Yes |
| Database updates | Never | Every week, with a free MaxMind key |
| CDN country header | Ignored | Read first |
| Fallback without a database | No | Online service |
| Blocked visitors | Fixed page | Redirect by country and language |
| Search engines | No exception | Always allowed |
| IP deny list | No | Yes |
| HTTP code | 403 | 403 or 503 |
| Proxy, VPN, Tor | No | Option |
Compared with other modules: many require you to download the GeoLite2 database by hand, create a MaxMind account or set up a cron job. Here, all of that is optional.
Good to know: native geolocation is located in International > Localization > Geolocation. You do not need to enable it with this module.
04 - Video
See the module in action
Three visitors facing the same shop (France, United States, Googlebot), then blocking a country in one click, redirect by language and the self-check. Silent video.
05 - Technical
Technical specifications
Lightweight, safe and compatible with all your versions
- PrestaShop 1.6 to 9.x
- All major versions
- PHP 5.6 and up
- Wide server compatibility
- Geolocation
- CDN header, local GeoLite2 database, ip-api.com service (HTTPS with a pro key)
- Cache
- A country is resolved only once per visitor
- Bots
- Local detection, no network call
- Multistore
- Shop, group or default settings
- Back office
- English, French, German, Spanish, Italian, Polish
- Native tables
- None modified
Stay in control of who enters your shop
Installed in a few clicks, active right away. You choose the countries, the module takes care of the rest.