D
D
Dmitry Filandor2016-08-01 20:10:34
Search Engine Optimization
Dmitry Filandor, 2016-08-01 20:10:34

How to deal with bots checking wp-login?

Hello!
I regularly see errors in the logs file not found and wp-login, wp-upload and other paths to the CMS
... more efficient?
For example, if I see that they are knocking on the wp-login path, then redirect them to my main page (so that the entry is counted), but it may be even worse for SEO ....
PS I have a self-written site, all this is not there, and an error is written to the log - File not found.
In general, you need a word of a specialist.
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
My joy, 2016-08-01
@t-alexashka

The most efficient is:

Disallow: /wp-login*
Disallow: /wp-upload*

In robots.txt
PS Robots that even knock on the paths specified in Disallow are illegal. Yandex Bot and Google Bot (and BingSearch Bot) always look at robots.txt first.

X
xmoonlight, 2016-08-01
@xmoonlight

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} (libwww-perl|curl|wget|python|nikto|scan) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ({|}|<|>|’|%0A|%0D|%27|%3C|%3E|) [NC,OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-upload [NC,OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin
RewriteRule .* index.php [F,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question