惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
D
DataBreaches.Net
F
Full Disclosure
腾讯CDC
博客园 - 【当耐特】
MyScale Blog
MyScale Blog
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
SegmentFault 最新的问题
The Register - Security
The Register - Security
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
J
Java Code Geeks
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy International News Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
A
Arctic Wolf
Scott Helme
Scott Helme
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tor Project blog
博客园 - 三生石上(FineUI控件)
Know Your Adversary
Know Your Adversary
AWS News Blog
AWS News Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
CERT Recently Published Vulnerability Notes
O
OpenAI News
Project Zero
Project Zero
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Application and Cybersecurity Blog
Application and Cybersecurity Blog
云风的 BLOG
云风的 BLOG
N
News and Events Feed by Topic
MongoDB | Blog
MongoDB | Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Security Blog
Microsoft Security Blog
Cisco Talos Blog
Cisco Talos Blog
P
Palo Alto Networks Blog
Schneier on Security
Schneier on Security

记录生活,精彩一刻 - typecho

Typecho 插件推荐 UploadPlugin Typecho 站内搜索插件 SiteSearch(BUG) Typecho-Riven主题正式发售啦 Typecho 已经更新到1.3.0 ,你更新了吗? 推荐一款特别漂亮的Typecho主题 - 见字 Typecho插件:ImageAccelerator文章图片加速 Typecho开启Gzip压缩加速网站 Typecho 数据库字符集导致Emoji表情评论报错 Typecho 博客自定义右键 Typecho 网站更换域名操作指南 Typecho发布文章时出现的错误
分享一个适用于Typecho博客的Robots协议规则
Huo · 2025-03-01 · via 记录生活,精彩一刻 - typecho

前言

最近登录必应的站长平台发现一个新的SEO问题:许多页面具有相同标题,最后通过设置Robots规则成功解决这个问题

Robots规则是什么?

robots协议也称爬虫协议、爬虫规则等,是指网站可建立一个robots.txt文件来告诉搜索引擎哪些页面可以抓取,哪些页面不能抓取,而搜索引擎则通过读取robots.txt文件来识别这个页面是否允许被抓取

那该如何设置呢?

首先需要在我们网站的根目录创建一个robots.txt文件
如本站的:https://9sb.net/robots.txt
接着在这个文件里面添加下面的内容

# robots.txt
User-agent: *
Allow: /*.html
Allow: /tag
Allow: /category
Disallow: /user
Disallow: /feed
Disallow: /author
Disallow: /*?scroll=comment-*
Disallow: /*/comment-page-*

其中Allow表示允许,Disallow表示不允许,可以使用*正则表达式,以上Disallow拒绝抓取的,就是可能会出现大量重复链接的,也可以在下面继续添加我扩展的,这都是一些垃圾爬虫和AI爬虫,爬取没有任何意义,并且可能会影响我们网站性能,继续在这个文件里面添加下面的内容,为了好区分中间可以隔一行空格

User-agent: DotBot
Disallow: /
User-agent: DataForSeoBot
Disallow: /
User-agent: SemrushBot
Disallow: /
User-agent: MJ12bot
Disallow: /
User-agent: AhrefsBot
Disallow: /
User-agent: Feedly
Disallow: /
User-agent: ias-ir
Disallow: /
User-agent: adsbot
Disallow: /
User-agent: barkrowler
Disallow: /
User-agent: Mail.RU_Bot
Disallow: /
User-agent: SEOkicks
Disallow: /
User-agent: ias-va
Disallow: /
User-agent: proximic
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: grapeshot
Disallow: /
User-agent: BLEXBot
Disallow: /
User-agent: Amazonbot
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: ImagesiftBot
Disallow: /
User-agent: GoogleOther
Disallow: /
User-agent: Applebot
Disallow: /
User-agent: GPTBot
Disallow: /
User-agent: DataForSeoBot
Disallow: /
User-agent: peer39 crawler
Disallow: /
User-agent: FriendlyCrawler
Disallow: /
User-agent: magpie-crawler
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: omgili
Disallow: /
User-agent: Meltwater
Disallow: /
User-agent: AwarioSmartBot
Disallow: /
User-agent: ChatGPT-User
Disallow: /
User-agent: anthropic-ai
Disallow: /
User-agent: img2dataset
Disallow: /
User-agent: YouBot
Disallow: /
User-agent: PipiBot
Disallow: /
User-agent: Seekr
Disallow: /
User-agent: scoop.it
Disallow: /
User-agent: AwarioRssBot
Disallow: /
User-agent: Diffbot
Disallow: /
User-agent: Claude-Web
Disallow: /
User-agent: FacebookBot
Disallow: /
User-agent: PerplexityBot
Disallow: /

最后把我们的网站地图,添加进去即可,如Sitemap: https://9sb.net/sitemap.xml

然后我们需要去搜索引擎站长平台,提交我们的Robots规则,可以看《7大搜索引擎以及各自的站长平台》这篇文章,之后就静静等待即可。

本文转自:句号网络