Sitemap(sitemap.xml)最佳實務
sitemap 不是排名捷徑,但它是「發現 URL」與「加速收錄」的超級工具。特別是多語言與大量內容(pSEO)網站,更需要 sitemap 維持可爬取效率。
1) sitemap 只放你希望排名的 URL
- 只放 canonical URL(避免參數與重複版本)
- 不要放 noindex、404、redirect URLs
- 多語言(/en)要把每個語言版本都列出
2) 範例:一個最小可行的 sitemap
xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2025-01-01</lastmod>
</url>
<url>
<loc>https://example.com/en/</loc>
<lastmod>2025-01-01</lastmod>
</url>
</urlset>3) 用 sitemap 生成器產生(最省時間)
- 打開 sitemap 生成器。
- 把你想收錄的 URL 清單整理好(只放 canonical + indexable)。
- 輸出 `sitemap.xml` 放到站點根目錄。
- 在 Google Search Console / Bing Webmaster Tools 提交 sitemap。
4) 規模化:拆分與 sitemap index
當 URL 超過 50,000 或 sitemap 過大時,拆成多個 sitemap,並用 sitemap index 聚合。對 pSEO(大量詞彙頁)很常見。
延伸閱讀
常見問題
關於 sitemap 與提交收錄的疑問。