sitemap 与 robots 托管
由平台生成 sitemap.xml 与 robots.txt,包含多语言 alternates 与 AI 爬虫策略。
托管方式
两种接法任选:
- 反向代理:把
/sitemap.xml与/robots.txt代理到https://api.soobro.com/v1/sites/{publicKey}/sitemap.xml、…/robots.txt - 框架适配器:Next.js 用
geoSitemap()/geoRobots(),其他框架用@geo/sdk/server的fetchSitemap()/fetchRobots()渲染
sitemap
- 内容库文章、栏目页、自定义页面按发布状态自动纳入
- 每条 URL 带
xhtml:link rel="alternate" hreflang多语言集合 - 超过 50 000 条自动分片并生成 sitemap index
changefreq与priority可按类型配置
<url>
<loc>https://example.com/zh-CN/blog/smart-home-guide</loc>
<lastmod>2026-11-01</lastmod>
<xhtml:link rel="alternate" hreflang="zh-Hans" href="https://example.com/zh-CN/blog/smart-home-guide" />
<xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/blog/smart-home-guide" />
</url>robots.txt
在 站点管理 → robots.txt 配置规则与 AI 爬虫策略:
User-agent: *
Allow: /
Disallow: /api/
User-agent: GPTBot
Allow: /
User-agent: ClaudeBot
Allow: /
Sitemap: https://example.com/sitemap.xml对 GEO 来说允许 GPTBot、ClaudeBot、PerplexityBot、Google-Extended 等 AI 爬虫是被引用的前提;如需限制,可按爬虫单独设置。
失效
发布、取消发布或修改配置后,托管的 sitemap 与 robots 在 60 秒内更新;边缘缓存按站点失效。