A
A
alex stephen2017-04-06 13:50:30
Nginx
alex stephen, 2017-04-06 13:50:30

Nginx: how to block Wordpress crawlers?

Actually, there is a certain project created NOT on WordPress.
I have logging and sending all errors to the mail (including 404).
Accordingly, bots now regularly send me 404 errors in the mail from bots that are hammered into wp-login, wp-include/..., etc.
Are there any ready-made solutions for blocking such muck on the Nginx side? Suppose all requests to site.ru/wp-*/ are automatically blocked.
Moreover, ideally, there should be a redirect to a page with a captcha, after passing which the IP is unblocked.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2017-04-06
@berezuev

location ~ ^/wp-.*$ {
  return 403;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question