Block Country

Block Country 1.0.0

No permission to download
Compatible XF 2.x versions
  1. 2.3
License
https://creativecommons.org/licenses/by/4.0/
Block Country is a lightweight, performance-focused security and access control add-on for XenForo. It allows you to restrict your community to specific countries while giving you one-click control to block aggressive AI crawlers, SEO scrapers, and automated HTTP bots before your forum even loads. By intercepting unwanted traffic early and returning a lightweight 403 Forbidden response, this add-on protects your content from unauthorized scraping and significantly reduces unnecessary server load-all without hurting your search engine rankings or social media link previews.

Easily restrict access to specific countries by entering comma-separated two-letter ISO country codes (e.g., US, GB). Leave blank to allow global traffic while still using the bot-blocking features. Keep your SEO and link embeds intact even if you block the countries those crawlers originate from (such as blocking the US while keeping Googlebot active). Includes toggles for...

Search engines:
Googlebot, Bingbot, YandexBot, Applebot, DuckDuckBot, Baiduspider, Yahoo! Slurp, Sogou, SeznamBot, and iaskspider.

Social & Link previews:
Facebook, X (Twitter), Telegram, Discord, WhatsApp, and LinkedIn.

Testing & Validation tools:
Google PageSpeed / Lighthouse and W3C Validators (including Schema Markup Validator support).

One-Click AI crawler blocker:
Prevent AI companies from scraping your community's discussions for training data. Includes individual toggles for OpenAI (GPTBot), Anthropic (ClaudeBot), Google-Extended, Meta AI, ByteDance (Bytespider), Perplexity, xAI (Grok), DeepSeek, Common Crawl, and 15+ other AI bots.

SEO scraper & Automated script blocker:
Stop bandwidth-heavy SEO tools and automated scraping scripts in their tracks. Block Ahrefs, Semrush, Majestic, Moz, DataForSeo, Headless Chrome, cURL, Wget, Python (python-requests), Go, Node.js (axios/node-fetch), and Perl HTTP clients.

Custom user-agent blacklist:
Easily add your own custom user-agent strings or bot keywords (one per line) to immediately block specific unwanted crawlers regardless of their country of origin.

See the FAQ section for more information.

Important notes:
-You can customize the 403 block page message by editing the add-on's phrases.
-Works seamlessly with or without Cloudflare. If you use Cloudflare, see the FAQ section.
-If you want to see the 403 block page in action, temporarily exclude your own country code from the Allowed countries list (e.g., enter ZZ) and visit your forum in an incognito window-just remember to add your country back afterward so you don't lock yourself out!
-This add-on includes IP geolocation data from DB-IP.com, with attribution displayed on the 403 Forbidden page in accordance with the CC BY 4.0 license.

You can check out the screenshots below.

block-country-options-1.webp


block-country-options-2.webp


block-country-options-3.webp



Result:

block-country-options-403-result.webp
Author
Eagle
Downloads
8
Views
64
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Eagle

  • Export Direct Messages
    Export Direct Messages
    This add-on allows your users to seamlessly export their direct messages in various formats.
  • Advanced Forum Restrictions
    Advanced Forum Restrictions
    Restricts threads, links, messages, comments, profiles, and signatures based on post count and more!
  • Account Essentials
    Optimize accounts: Adds DOB edits, alert wiping, attachment hubs, quote rewrites, and privacy tools.
  • Advanced Account Deletion
    Advanced Account Deletion
    Protects privacy via self-deletion, data anonymization, metadata sanitation, and automated queues.
  • User Blocking System
    User Blocking System
    This add-on replaces the ignore system with an aggressive, absolute block system across all streams.
Back
Top Bottom