robots.txt
robots.txt文件是搜索引擎访问网站第一个要查看的文件。通过robots.txt文件搜索引擎可以确定哪些链接是搜索引擎可以访问的。哪些链接是不希望搜索引擎访问的。甚至可以告知允许哪些搜索引擎访问网站。相当于网站与搜索引擎之间的协议。在搜索引擎找到robots.txt文件后会以robots.txt来确定访问的范围。如果没有robots.txt文件。搜索引擎默认全部页面都是可以访问的。下面是我自己网站的robots.txt文件User-agent: *
Disallow:/api/
Disallow:/hapi/
Crawl-delay: 5
Sitemap: https://www.example.com/sitemap.xml
sitemap
sitemap文件就告诉搜索引擎网站有哪些链接以及链接的更新频率,sitemap可以为txt、html和xml格式
sitemap.xml
<?xml version="1.0" encoding="UTF-8"?>sitemap.txt
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
>
<url>
<loc>http://www.example.com/test1/</loc>
<priority>0.3</priority>
<lastmod>2021-10-07</lastmod>
<changefreq>weekly</changefreq>
</url>
</urlset>
http://www.example.com/test1/sitemap.html
http://www.example.com/test2/
<!DOCTYPE html>
<head>
<title>网站地图</title>
<meta http-equiv="Content-type" content="text/html;" charset="UTF-8" />
<style>
body{font-family: Arial, "微软雅黑";font-size: 13px;}
ul, li{margin:0px; padding:0px; list-style:none;}ul{width:800px;margin-left: auto;margin-right: auto;}.title{width:800px;font-size: 18px;}.lks{float: left;padding-right: 15px;line-height: 30px;font-size: 16px;}
</style>
</head><body align="center">
<ul><li class="title"><h3>www.example.com网站地图:(2021-10-07)</h3></li>
<li class="lks">1、<a href="http://www.example.com/test1/" title="Example Domain" target="_blank">测试栏目</a></li>
</ul></body></html>
网友回复
有没有不依赖embedding向量的RAG技术?
有没有支持实时打断语音通话并后台帮你执行任何的ai模型?
开源ai大模型文件格式GGUF、MLX、Safetensors、 ONNX 有什么区别?
出海挣钱支付收款PayPal、Wise 、PingPong、Stripe如何选择?
如何实现类似google的图片隐形水印添加和识别技术?
linux上如何运行任意windows程序?
ai能写出比黑客还厉害的零日漏洞等攻击工具攻击任意软件系统工程?
js如何获取浏览器的音频上下文指纹、Canvas指纹、WebGL渲染特征?
为啥ai开始抛弃markdown文本,重新偏好html文本了?
网站有没有办法鉴别访问请求是由ai操控chrome-devtools-mcp发出的?


