|

大卫教你做AEO系列第2课-llms.txt文件

hello,同学们,今天我们进入大卫教你做AEO系列的第2课啦,这一节课大卫老师教你们来认识AI收录网站内容一个非常重要的工具,Llms.txt文件。

两种.txt文件

在SEO时代,我们知道要想搜索引擎识别你网站的内容,谷歌派出它的情报员-Googlebot Spider在整个web上到处抓取页面,其中爬虫会访问一个文件-robots.txt。

这个文件其实是对谷歌爬虫的一个通告,通告的基本内容如下

ounter(lineounter(lineounter(lineounter(lineuser-agent:* #注解:这一行是注明通告对象,*代表网络上主流的搜索引擎allow:/      #注解:allow是告诉爬虫运行抓取的内容,/表示允许爬取根域名下面所有页面  disallow:/wp-admin #注解:告诉爬虫禁止抓取页面disallow:/cart

以上是在SEO时代一个标准的robots.txt文件。

在AEO时代,仅仅一个robots.txt是不够的,因为你还要通告AI的爬虫来访问你网站的内容,AI的爬虫通过llms.txt来识别你网站页面。

它的样子如下:

ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line# Title
> Optional description goes here
Optional details go here
## Section name
- [Link title](https://link_url): Optional link details
## Optional
- [Link title](https://link_url)

看不懂没关系,这个文件你没必要自己去写,有插件能够帮你完成

什么是Llms.txt

定义:llms.txt是一个便于AI大语言模型抓取和访问网站页面内容的特殊文件,文件使用markdown的格式写成,一般放在网站根目录中,

可以访问llms.txt的AI模型包括:

Chatgpt,Gemini,Perplexity,Claude,Grok,Deepseek主流的大语言模型。

为什么要编写Llms.txt

主要有以下几个原因:

1.传统的网站页面大多数都是html,这对于AI抓取来说不是非常友好,特别是有些非常复杂的网站,包含各种js文件,导航结构等等.

2.llms.txt使用markdown可读性比较强的格式对网站内容进行分类,AI抓取更精准,比如FAQ,很多AI Overview的答案都是直接从FAQ分类中读取的。

编写llms.txt注意的地方:

  • 使用markdown格式
  • 对于不重要的页面不要放进去
  • 尽量不要使用过于复杂的html,javascript代码
  • 里面的命令不要和robots.txt矛盾

生成llms.txt的两种方法

手动编写

跟编写robots.txt一样,你可以手动编写llms.txt文件,前提你要去学习一下markdown语法的写法,几分钟就学会了,我这篇文章的格式就是使用markdown语法完成的。

推荐可以去 https://markdown.com.cn/这个网站学习markdown语法。

编写步骤 :

  1. 在说明创建一个llms.txt文件

  2. 按照以下格式进行编写:

ounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(lineounter(line# Title #一般是网站的title
> Optional description goes here #一般是关于这个网站是什么的简短介绍
Your website is one of the best online store of [keywords] 
## Page
- [about us](https://yourwebsite.com/about-us): this is about us page #关于我们页面的链接- [products](https://yourwebsite.com/products): this is products page #关于产品分类的链接
## Optional #网站其他的内容链接,可以是blog
- [What is the llms.txt ](https://yourwebsite.com/blog/what-is-llmstxt)

使用插件自动生成

WP或者Shopify都有能够生成llms.txt的插件,这里给大家推荐一个WP的插件

websites llms.txt

安装激活以后选择允许被插件写入的页面分类

Image

总结

为你的网站配置llms.txt是AEO的基本配置,想让你的网站能够被AI收录,AI Answer出现你网站的链接还有引用内容,那就赶紧为你的网站配置起来。

如果你喜欢我写的内容,强烈建议分享,收藏,点赞,别忘了关注我的公众号

想加入AEO学习群的老铁们,可以加我微信号拉你进群,加我的时候注明AISEO进群

扫描二维码加我

Image

类似文章