User-agent: * Allow: / Allow: /sitemap.xml Allow: /robots.txt Allow: /css/ Allow: /js/ Allow: /images/ Allow: /fonts/ # 禁止抓取的管理和系统目录 Disallow: /admin/ Disallow: /administrator/ Disallow: /wp-admin/ Disallow: /wp-includes/ Disallow: /includes/ Disallow: /cache/ Disallow: /tmp/ Disallow: /logs/ Disallow: /backup/ Disallow: /config/ # 禁止抓取的动态参数和脚本 Disallow: /*.php$ Disallow: /*.asp$ Disallow: /*.aspx$ Disallow: /*? Disallow: /*& Disallow: /*= Disallow: /*.php? # 禁止抓取的用户相关页面 Disallow: /user/ Disallow: /users/ Disallow: /profile/ Disallow: /account/ Disallow: /login/ Disallow: /register/ Disallow: /password-reset/ # 禁止抓取的搜索和过滤页面 Disallow: /search/ Disallow: /*/search/ Disallow: /filter/ Disallow: /sort/ # 禁止抓取的购物相关页面(如果是电商功能) Disallow: /cart/ Disallow: /checkout/ Disallow: /basket/ Disallow: /wishlist/ Disallow: /compare/ # 允许抓取的重要文件类型 Allow: /*.css$ Allow: /*.js$ Allow: /*.jpg$ Allow: /*.jpeg$ Allow: /*.png$ Allow: /*.gif$ Allow: /*.svg$ Allow: /*.webp$ Allow: /*.woff$ Allow: /*.woff2$ Allow: /*.ttf$ # 网站地图声明 Sitemap: https://{{host}}/sitemap.xml # 特定搜索引擎配置 User-agent: Googlebot Allow: / Crawl-delay: 1 Disallow: /private-gallery/ User-agent: Googlebot-Image Allow: /images/ Allow: /uploads/ Disallow: /private-images/ User-agent: Bingbot Allow: / Crawl-delay: 2 User-agent: Baiduspider Allow: / Crawl-delay: 3 User-agent: YandexBot Allow: / Crawl-delay: 2 # 禁止AI训练爬虫(可选) User-agent: ChatGPT-User Disallow: / User-agent: GPTBot Disallow: /