问题原文
原帖链接 · sudo --do-it · CC BY-SA 3.0
Because it was blocking Googlebot from accessing important files, I recently updated our /robots.txt file and removed most of it, including wp-admin.
Now, the people on charge of hosting and SEO stuff sent me an email warning that some of the admin pages are indexed by Google and that I must disallow the wp-admin. For security reasons.
But I don't get it, why is this a security issue? Isn't a potential attacker already aware of such files since Wordpress is pretty common and standard?
已采纳解答
原帖链接 · Goyllo · CC BY-SA 3.0
If I was running wordpress, then I will not block anything with robots.txt, because it prevents Google for crawling, not for indexing. Just search on Google "Google analytics Web", and you will see link which is blocked in robots.txt, but still it is exist in search result.
And by default, Assets files like css, js and images are stored in wp-admin directory, so it will cause error to render correctly for Google spider.
And, there are so many Google dork to find out bulk wp-admin pages in Google search result, and your site will be visible if you just using robots.txt for prevent.
I suggest use only noindex meta tags in wp-admin.
And here many of people talk about security, but Google can't crawl password protected directory.
Extra note: Don't use both. I mean if you block wp-admin directory in robots.txt, then Google will never know, you have placed noindex meta tags in wp-admin, because they follow robots.txt first then meta tags on webpages.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
