• Hi everyone!

    How do we block specific countries and their IP addresses from visiting our website?

    For example – we have a website in lets say England, and we only want traffic from there. How do we stop countries like China from being able to visit our domain?

    Is there anyway to block countries as a whole? (not looking for IP addresses blockers, but whole countries)

    Thanks!

Viewing 1 replies (of 1 total)
  • It’s best to do such things outside of your web hosting server — so your site/server doesn’t waste valuable time and server resources blocking unwanted visitors. A basic free Cloudflare plan does a great job: https://www.cloudflare.com/

    If you want to do this directly on your WordPress website, you’re going to need a plugin — as WordPress doesn’t ship with any feature to lock/allow visitors.

    Many security/firewall plugins have country-blocking capability, though this may be a premium (ie paid) feature in some of these plugins. There are also several plugins just for managing access control lists (including country denylist/allowlist). See: https://www.ads-software.com/plugins/search/country+blocking/

    not looking for IP addresses blockers

    While you don’t have to enter individual IP addresses, behind the scenes it’s just swaths of IP addresses assigned to the particular country that’s being blocked/allowed.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.