admin管理员组

文章数量:1426403

I have a website using self-hosted WordPress.

I am pretty confused with the GDPR law by EU.

So, I want to block EU users from accessing my websites. How i can do that?

Please help!

I have a website using self-hosted WordPress.

I am pretty confused with the GDPR law by EU.

So, I want to block EU users from accessing my websites. How i can do that?

Please help!

Share Improve this question edited May 25, 2019 at 12:17 fuxia 107k39 gold badges255 silver badges459 bronze badges asked May 25, 2019 at 6:59 Abhishek VERMAAbhishek VERMA 344 bronze badges 1
  • The GDPR is not just about EU users. AdSense, for instance, supports its "cause". Besides, you have many WP plugins that can help you with that. You can also find tons of articles on the internet that could help you become less confused. This is also not a WordPress related question. – filipecsweb Commented May 25, 2019 at 17:58
Add a comment  | 

2 Answers 2

Reset to default 1

I would use .htaccess. To do so you can:

  1. Login via FTP, sFTP or SSH to your WordPress root installation. Find and open .htaccess file.
  2. Visit this website and choose the countries you want to block. It will generate a list of IPs ready to copy and paste on your .htaccess.
  3. Paste the list.

If you don't know how to access search for a plugin in the repository like https://wordpress/plugins/ip-geo-block/.

The proper way is to take the time to read about cookies and privacy and implement it. Some basics are:

  1. Ensure you block cookies until they are accepted.
  2. Ensure you ask for permission in your forms to process the data.
  3. Ensure you don't keep european users data outside EU servers.

Blocking EU users might work, but maybe not. There are techniques to get around that, including private browsing. So I don't think that is a global-type solution.

There are many GDPR plugins to add to your site. I looked at all of them last year, and found them too complex. So wrote my own, which just puts a cookie notice 'accept' on the page and does enough for my needs. It's called "Simple GDPR". It will even make a generic privacy page for you.

As long as you are not storing user info (other than cookies for comments), a simple GDPR notice should suffice for your site. Even if you are using analytics, a notice about that is sufficient, IMHO. (My plugin even has Google Analytics implementation, and does it server-side so GA won't be blocked by ad-blockers. And it anonymizes IP info, so you are not tracking the individual user.)

本文标签: content restrictionHow to stop EU users from accessing my website