大网数据广告活动
网站运营与故障问答

Are indexed Wordpress admin pages a security threat?

· 52CE 我爱测

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 th…

问题原文

原帖链接 · 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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2016-02-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。