我浏览网页,试图find托pipe的WordPress博客的理想的robots.txt内容。 我发现了几个选项,例如在这里和这里 。
我认为这对于ServerFault来说是一个很好的问题:对于WordPress上的“简单”博客,最理想的robots.txt是什么?
目前,我在网上的其他地方find了以下的robots.txt文件:
User-agent: * Disallow: /cgi-bin Disallow: /wp-admin Disallow: /wp-includes Disallow: /wp-content/plugins Disallow: /wp-content/cache Disallow: /wp-content/themes Disallow: /trackback Disallow: /feed Disallow: /comments Disallow: /category/*/* Disallow: */trackback Disallow: */feed Disallow: */comments Disallow: /*?* Disallow: /*? Allow: /wp-content/uploads # Google Image User-agent: Googlebot-Image Disallow: Allow: /* # Google AdSense User-agent: Mediapartners-Google* Disallow: Allow: /* # Internet Archiver Wayback Machine User-agent: ia_archiver Disallow: / # digg mirror User-agent: duggmirror Disallow: /
谢谢
没有“理想”的robots.txt,虽然会有一个非常适合你。 只要制定出你想要的机器人看到,并创build一个robots.txt不容许的一切。 不需要“允许”行,因为机器人parsing这些文件来确定你不希望他们看的东西,然后假设一切都是公平的游戏。 例如,我自己的robots.txt适用于wordpress的部分是:
Disallow: /blog/wp-*.php Disallow: /blog/wp-admin/ Disallow: /blog/wp-includes/ Disallow: /blog/wp-content/
我从来没有考虑过使用WordPress的robots.txt文件 – 我只是确保文件的权限,我不希望随机用户运行(如安装程序或升级)是正确的。