查看文章
 
Sitemap语法指南
2008-11-04 2:17
什么是sitemap,从wiki上可以找到的解释是:
    The Sitemaps protocol allows a webmaster to inform search engines about URLs on a website that are available for crawling. A Sitemap is an XML file that lists the URLs for a site. It allows webmasters to include additional information about each URL: when it was last updated, how often it changes, and how important it is in relation to other URLs in the site. This allows search engines to crawl the site more intelligently. Sitemaps are a URL inclusion protocol and complement robots.txt, a URL exclusion protocol.
    即sitmaps是站点管理员向搜索引擎爬虫公布站点可被抓取页面的协议,sitemap文件内容必须遵循XML格式的定义。每个URL可以包含更新的周期和时间、URL在整个站点中的优先级。这样可以让搜索引擎更佳有效的抓取网站内容。
Sitemaps 的XML格式样例:
   <?xml version='1.0' encoding='UTF-8'?>
   <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
     <url>
     <loc>http://w3c-at.de</loc>
     <lastmod>2006-11-18</lastmod>
     <changefreq>daily</changefreq>
     <priority>0.8</priority>
     </url>
</urlset>
目前Google Yahoo和Ask.com支持的最新sitemaps标准是0.9版本。sitemaps文件必须为utf-8的编码格式,每个sitemaps文件只能有一个<urlset>的顶级标签。
   每个<url>标签是对一个URL的描述:
    <loc>是URL的绝对地址,必须用http或https开头
    <lastmod>是该URL的最后一次修改时间
    <changefreq>表示该URL的更新频率,可以设置为daily weekly always
    <priority>是该URL在整个站点的权重,是1.0~0.1之间的数值

sitemaps文件的限制:
     必须是utf-8的编码格式
     每个sitemap文件包含的URL建议不超过5w个URL
     单个sitemap文件不能超过10M大小

在线的sitemaps生成工具:
     XML-sitemap.com 大型网站生成容易超时
     Webmaster 工具

类别:搜索引擎优化||添加到搜藏 |分享到i贴吧|浏览(1285)|评论 (0)
 
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
     

   
帮助中心 | 空间客服 | 投诉中心 | 空间协议
©2012 Baidu