一,什麼是Sitemaps?
Sitemaps協議使您能夠告知搜索引擎您網站中可供抓取的網址,使用Sitemaps協議的Sitemaps就是列有某個網站所有網址的XML文件。如本站的/auto.xml
二,XML文件信息?
XML文件提供網址、上次更新的時間、更改的頻率、與網站中其他網址相比它的重要性信息。示例如下:
- <?xml version=1.0″ encoding=UTF-8″?>
- <urlset xmlns=/schemas/sitemap/0.84″>
- <url>
- <loc>/</loc>
- <lastmod>2009-01-19</lastmod>
- <changefreq>monthly</changefreq>
- <priority>0.8</priority>
- </url>
- </urlset>
三,字符編碼?
UTF-8
四,實體轉義?
對於所有的XML文件,任何數據數值(包括網址)都應對下表中列出的字符使用實體轉義碼。
字符 轉義碼
符號 amp;
單引號 apos;
雙引號 quot;
大於 > gt;
小於 < lt;
五,gzip壓縮?
壓縮Sitemaps文件會降低對帶寬的要求,未壓縮的 Sitemaps 文件不得大於10MB。
六,Sitemaps文件?
提供的每個Sitemaps文件包括的網址不得超過50,000個。
七,Sitemaps索引文件?
Sitemaps索引文件隻能列出不超過1,000個Sitemaps,Sitemaps索引文件隻能指定與其位於同一網站的Sitemaps。
XML格式的Sitemaps索引示例:
- <?xml version=1.0″ encoding=UTF-8″?>
- <sitemapindex xmlns=/schemas/sitemap/0.84″>
- <sitemap>
- <loc>/sitemap1.xml.gz</loc>
- <lastmod>2009-01-19T18:23:17+00:00</lastmod>
- </sitemap>
- <sitemap>
- <loc>/sitemap2.xml.gz</loc>
- <lastmod>2009-01-19</lastmod>
- </sitemap>
- </sitemapindex>
八,Sitemaps存放位置?
Sitemaps放置在Web服務器的根目錄處。