兩者兼備,缺一不可。
# 網站根目錄 robots.txt
User-agent: *
Disallow: /admin/
Disallow: /private/
Sitemap: https://www.kiford.com/sitemap.xml
Sitemap: https://www.kiford.com/sitemap_images.xml
Sitemap:,支持多個。<footer>
<a href="/sitemap.html" rel="nofollow">網站地圖 (HTML 版)</a> |
<a href="/sitemap.xml" rel="nofollow">Sitemap (XML 版)</a>
</footer>
rel="nofollow" 避免稀釋頁面權重(可選)。| 作用 | 說明 |
|---|---|
| 加速新頁發現 | 爬蟲優先讀取 Sitemap,無需沿鏈接層層爬取。 |
| 覆蓋深層/孤立頁 | 內部鏈接稀疏的頁面通過 Sitemap 直接入庫。 |
| 傳遞元數據 | <lastmod>、<changefreq>、<priority> 引導爬蟲抓取頻次。 |
| 大站分片管理 | Sitemap Index 拆分多個子 Sitemap,單文件 ≤ 5萬 URL / 50MB。 |
| 錯誤診斷 | Search Console / 站長平台顯示「已提交/已索引/錯誤」統計。 |
sitemap.xml,保證 <lastmod> 準確。xmllint --schema sitemap.xsd sitemap.xml 或線上工具驗證格式。對於 www.kiford.com 這類專家雲平台,**雙軌制部署 + 動態更新 + 主動推送**,是讓蜘蛛「來得快、抓得全、索引準」的組合拳。