教你如何利用robots来实现网站收录

使用说明

1. robots.txt可以告诉百度您网站的哪些页面可以被抓取,哪些页面不可以被抓取。

2. 您可以通过Robots工具来创建、校验、更新您的robots.txt文件,或查看您网站robots.txt文件在百度生效的情况。

3. Robots工具目前支持48k的文件内容检测,请保证您的robots.txt文件不要过大,目录最长不超过250个字符。

看图片.是不是感觉对你收录网站有很大的期望.但是有时候百度会卡蛋.检测一直都是错误、错误、错误….

教程: 需要准备一个Robots.txt文件,用来检测 需要准备一个sitemap.html文件,用来提交你要收录的网站Robots.txt文件代码:

# robots.txt generated at http://tool.chinaz.com/robots/

User-agent: Baiduspider

Disallow:

User-agent: Sosospider

Disallow:

User-agent: sogou spider

Disallow:

User-agent: YodaoBot

Disallow:

User-agent: Googlebot

Disallow:

User-agent: Bingbot

Disallow:

User-agent: Slurp

Disallow:

User-agent: Teoma

Disallow:

User-agent: ia_archiver

Disallow:

User-agent: twiceler

Disallow:

User-agent: MSNBot

Disallow:

User-agent: Scrubby

Disallow:

User-agent: Robozilla

Disallow:

User-agent: Gigabot

Disallow:

User-agent: googlebot-image

Disallow:

User-agent: googlebot-mobile

Disallow:

User-agent: yahoo-mmcrawler

Disallow:

User-agent: yahoo-blogs/v3.9

Disallow:

User-agent: psbot

Disallow:

User-agent: *

Disallow:

Sitemap: 你的Sitemap文件网址

sitemap.html文件代码

在html里面加上你的所有内链即可[滑稽]

不用在写别的多余代码

准备好这两个文件后开始正题

1:必须把那两个文件放在主文件,就是主机第一个文件那

2:找出你那两个文件链接,比如https://www.huajinbei.xyz/baidu.html (这里Sitemap文件)

找出两个链接完成第一个步骤(注意要可以访问,不能404)

3:完成后在Robots里面最后一行的Sitemap写上你的Sitemap文件网址链接

4:回到百度站长那点击检测即可

(PS:点击后很大概率会出现错误或者301,联系百度客服即可,这个属于百度那边的错误。如果出现404就是你自己配置的网址链接没配置好,回去检查一下)

© 版权声明
THE END
喜欢就支持一下吧
点赞8 分享