如何为WordPress设置robots.txt文件

mAs*_*pEE 3 wordpress robots.txt

[更新2013]

我找不到具有针对WordPress的robots.txt文件格式的权威页面.我保证在我的网站上保留一个,但我想在堆栈溢出这里.

如果您知道自己在做什么,请在此处查看当前草稿:

http://mast3rpee.tk/?p=127

其他人对此发表评论:

的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/
Sitemap: http://domain.com/sitemap.xml
Crawl-delay: 4
Run Code Online (Sandbox Code Playgroud)

小智 10

User-agent: *
Allow: /
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content
Disallow: /e/
Disallow: /show-error-*
Disallow: /xmlrpc.php
Disallow: /trackback/
Disallow: /comment-page-
Allow: /wp-content/uploads/

User-agent: Mediapartners-Google
Allow: /

User-agent: Adsbot-Google
Allow: /

User-agent: Googlebot-Image
Allow: /

User-agent: Googlebot-Mobile
Allow: /

Sitemap: http://yoursite.com/sitemap.xml
Run Code Online (Sandbox Code Playgroud)

我认为此代码对于robots.txt文件非常真实,只需转到Public_HTML并使用robots.txt创建文件并粘贴上面的代码.你可以在你的记事本中制作,只需复制上面的代码并粘贴到notpad但记住文件名应该robots.txt并上传到你的public_HTML.


小智 0

在记事本中创建 robots.txt 并将其上传到 CPANEL 中的 public_html 。

*请记住在将文件上传到 public_html 之前将其重命名为 robots