SEO必修课之:Sitemap语法指南,如何使用sitemap.xml

痕风 2013年1月19日21:36:31
评论
140

什么是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在整个站点中的优先级。这样可以让搜索引擎更佳有效的抓取网站内容。

sitemap分为2种形式: 1、sitemap.html : 这种主要是针对用户而言,让用户能够快速的寻找到自己所需的东西,也是方便搜索引擎来有效的爬取网页内容,提高网站质量。 2、sitemap.xml  : 这种格式主要是谷歌自己推出的一种网站地图写法,你可以通过相关规范写出网站地图 然后通过“谷歌管理员工具”提交,这样谷歌的蜘蛛就能有目的的高效的快速的来访问网站,但是 提交的内容 谷歌蜘蛛没有保证一定都会收录!这个误区 请大家要区分开来。

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.xml文件包含的URL建议不超过5w个URL      单个sitemap.xml文件不能超过10M大小

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

继续阅读
weinxin
痕风的起点
专注于互联网资讯、中央空调、Windows、wordpress、建站技术、软件应用等相关网络资源的分享。
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: