什么是网站地图
网站地图,又叫站点地图,它就是一个列出了你网站上所有页面地址的清单文件,一般来说分为2种,一种是给搜索引擎看的,一种是给用户看的,前者帮助搜索引擎更好地收录你的网站,后者帮助用户更好的了解你的网站整体结构、更快的找到他们想要找的内容。本文讲的主要是前者。
站点地图格式
一般有3种格式,txt、xml、html,绝大部分情况下都是用xml格式,百度、谷歌都是支持xml格式。下面简单介绍3种格式。
txt格式
这种格式最简单,一般较少采用,示例如下:
sehmu.com
https://sehmu.com/
https://www.sehmu.com/
注意事项:
- 文本文件每行都必须有一个网址。网址中不能有换行。
- 不应包含网址列表以外的任何信息。
- 您必须书写完整的网址,包括 http。
- 每个文本文件最多可包含 50,000 个网址,并且应小于10MB(10,485,760字节)。如果网站所包含的网址超过 50,000 个,则可将列表分割成多个文本文件,然后分别添加每个文件。
- 文本文件需使用 UTF-8 编码或GBK编码。
xml格式
示例sitemap.xml如下:
Sitemap | Last Modified |
---|---|
https://www.sehmu.com/post-sitemap.xml | 2024-03-31 14:05 +00:00 |
https://www.sehmu.com/page-sitemap.xml | 2024-03-28 14:01 +00:00 |
https://www.sehmu.com/category-sitemap.xml | 2024-03-31 14:05 +00:00 |
https://www.sehmu.com/post_tag-sitemap.xml | 2024-03-31 14:05 +00:00 |
XML Sitemap
URL | Images | Last Mod. |
---|---|---|
https://www.sehmu.com/ | 0 | 2024-03-31 14:05 +00:00 |
https://www.sehmu.com/243.html | 0 | 2024-03-09 03:59 +00:00 |
https://www.sehmu.com/239.html | 0 | 2024-03-09 03:59 +00:00 |
https://www.sehmu.com/235.html | 0 | 2024-03-09 03:59 +00:00 |
https://www.sehmu.com/99.html | 0 | 2024-03-09 04:02 +00:00 |
https://www.sehmu.com/92.html | 0 | 2024-03-09 04:03 +00:00 |
https://www.sehmu.com/69.html | 0 | 2024-03-09 04:03 +00:00 |
https://www.sehmu.com/45.html | 0 | 2024-03-09 04:03 +00:00 |
https://www.sehmu.com/94.html | 0 | 2024-03-09 04:03 +00:00 |
https://www.sehmu.com/947.html | 1 | 2024-03-28 07:48 +00:00 |
https://www.sehmu.com/945.html | 1 | 2024-03-28 07:50 +00:00 |
https://www.sehmu.com/943.html | 1 | 2024-03-28 07:52 +00:00 |
https://www.sehmu.com/939.html | 1 | 2024-03-28 07:54 +00:00 |
https://www.sehmu.com/937.html | 1 | 2024-03-28 07:55 +00:00 |
https://www.sehmu.com/934.html | 1 | 2024-03-28 07:56 +00:00 |
https://www.sehmu.com/932.html | 1 | 2024-03-28 07:56 +00:00 |
https://www.sehmu.com/929.html | 1 | 2024-03-28 07:58 +00:00 |
https://www.sehmu.com/908.html | 1 | 2024-03-28 07:58 +00:00 |
https://www.sehmu.com/902.html | 1 | 2024-03-28 07:59 +00:00 |
https://www.sehmu.com/896.html | 1 | 2024-03-28 08:00 +00:00 |
https://www.sehmu.com/893.html | 1 | 2024-03-28 08:03 +00:00 |
https://www.sehmu.com/879.html | 1 | 2024-03-28 08:04 +00:00 |
https://www.sehmu.com/866.html | 1 | 2024-03-28 08:05 +00:00 |
https://www.sehmu.com/842.html | 1 | 2024-03-28 08:06 +00:00 |
https://www.sehmu.com/971.html | 1 | 2024-03-28 08:10 +00:00 |
https://www.sehmu.com/976.html | 1 | 2024-03-28 08:11 +00:00 |
https://www.sehmu.com/271.html | 1 | 2024-03-28 08:28 +00:00 |
https://www.sehmu.com/268.html | 1 | 2024-03-28 08:28 +00:00 |
https://www.sehmu.com/836.html | 1 | 2024-03-28 08:29 +00:00 |
https://www.sehmu.com/409.html | 1 | 2024-03-28 08:31 +00:00 |
https://www.sehmu.com/822.html | 1 | 2024-03-28 08:32 +00:00 |
https://www.sehmu.com/485.html | 1 | 2024-03-28 08:33 +00:00 |
https://www.sehmu.com/423.html | 1 | 2024-03-28 08:34 +00:00 |
https://www.sehmu.com/363.html | 1 | 2024-03-28 08:36 +00:00 |
https://www.sehmu.com/360.html | 1 | 2024-03-28 08:37 +00:00 |
https://www.sehmu.com/353.html | 1 | 2024-03-28 08:38 +00:00 |
https://www.sehmu.com/350.html | 1 | 2024-03-28 08:39 +00:00 |
https://www.sehmu.com/347.html | 1 | 2024-03-28 08:40 +00:00 |
https://www.sehmu.com/335.html | 1 | 2024-03-28 08:41 +00:00 |
https://www.sehmu.com/332.html | 1 | 2024-03-28 08:42 +00:00 |
https://www.sehmu.com/329.html | 1 | 2024-03-28 08:43 +00:00 |
https://www.sehmu.com/325.html | 1 | 2024-03-28 08:44 +00:00 |
https://www.sehmu.com/322.html | 1 | 2024-03-28 08:45 +00:00 |
https://www.sehmu.com/305.html | 1 | 2024-03-28 08:46 +00:00 |
https://www.sehmu.com/316.html | 1 | 2024-03-28 08:46 +00:00 |
https://www.sehmu.com/312.html | 1 | 2024-03-28 08:47 +00:00 |
https://www.sehmu.com/302.html | 1 | 2024-03-28 08:48 +00:00 |
https://www.sehmu.com/298.html | 1 | 2024-03-28 08:48 +00:00 |
https://www.sehmu.com/295.html | 1 | 2024-03-28 08:49 +00:00 |
https://www.sehmu.com/292.html | 1 | 2024-03-28 08:50 +00:00 |
https://www.sehmu.com/283.html | 1 | 2024-03-28 08:51 +00:00 |
https://www.sehmu.com/279.html | 1 | 2024-03-28 08:51 +00:00 |
https://www.sehmu.com/276.html | 1 | 2024-03-28 08:52 +00:00 |
https://www.sehmu.com/265.html | 1 | 2024-03-28 08:52 +00:00 |
https://www.sehmu.com/261.html | 1 | 2024-03-28 08:53 +00:00 |
https://www.sehmu.com/256.html | 1 | 2024-03-28 08:53 +00:00 |
https://www.sehmu.com/253.html | 1 | 2024-03-28 08:54 +00:00 |
https://www.sehmu.com/250.html | 1 | 2024-03-28 08:55 +00:00 |
https://www.sehmu.com/231.html | 1 | 2024-03-28 08:55 +00:00 |
https://www.sehmu.com/227.html | 1 | 2024-03-28 08:55 +00:00 |
https://www.sehmu.com/214.html | 1 | 2024-03-28 08:56 +00:00 |
https://www.sehmu.com/210.html | 1 | 2024-03-28 08:56 +00:00 |
https://www.sehmu.com/207.html | 1 | 2024-03-28 08:57 +00:00 |
https://www.sehmu.com/201.html | 1 | 2024-03-28 08:58 +00:00 |
https://www.sehmu.com/191.html | 1 | 2024-03-28 08:58 +00:00 |
https://www.sehmu.com/183.html | 1 | 2024-03-28 08:58 +00:00 |
https://www.sehmu.com/175.html | 1 | 2024-03-28 08:59 +00:00 |
https://www.sehmu.com/164.html | 1 | 2024-03-28 09:00 +00:00 |
https://www.sehmu.com/123.html | 1 | 2024-03-28 09:01 +00:00 |
https://www.sehmu.com/992.html | 1 | 2024-03-29 09:03 +00:00 |
https://www.sehmu.com/1346.html | 1 | 2024-03-29 09:04 +00:00 |
https://www.sehmu.com/1342.html | 1 | 2024-03-29 09:42 +00:00 |
https://www.sehmu.com/1339.html | 1 | 2024-03-29 09:44 +00:00 |
https://www.sehmu.com/951.html | 1 | 2024-03-29 09:50 +00:00 |
https://www.sehmu.com/1411.html | 1 | 2024-03-29 13:59 +00:00 |
https://www.sehmu.com/1437.html | 1 | 2024-03-29 14:33 +00:00 |
https://www.sehmu.com/1441.html | 1 | 2024-03-29 14:47 +00:00 |
https://www.sehmu.com/1446.html | 1 | 2024-03-29 15:29 +00:00 |
https://www.sehmu.com/1450.html | 1 | 2024-03-29 15:50 +00:00 |
https://www.sehmu.com/1457.html | 1 | 2024-03-29 16:20 +00:00 |
https://www.sehmu.com/1460.html | 1 | 2024-03-30 02:20 +00:00 |
https://www.sehmu.com/1463.html | 1 | 2024-03-30 02:35 +00:00 |
https://www.sehmu.com/1466.html | 1 | 2024-03-30 02:49 +00:00 |
https://www.sehmu.com/1469.html | 1 | 2024-03-30 03:42 +00:00 |
https://www.sehmu.com/1472.html | 1 | 2024-03-30 08:13 +00:00 |
https://www.sehmu.com/1476.html | 1 | 2024-03-30 08:32 +00:00 |
https://www.sehmu.com/1482.html | 1 | 2024-03-31 07:45 +00:00 |
https://www.sehmu.com/1486.html | 1 | 2024-03-31 14:05 +00:00 |
其中:
-
lastmod
表示本网页最后修改时间,必须是ISO-8601
时间格式,具体这个格式是什么样的没整清楚,根据我的理解,反正就当成是:yyyy-MM-ddTHH:mm:ss+08:00
,最后面的+08:00
应该表示的是东八区; -
priority
用来指定此链接相对于其他链接的优先权比值,可选值 0.0-1.0,一般来说网站首页1.0,然后二级三级页面依次降低,具体这个属性有多重要不太清楚。
一个sitemap
文件包含的网址不得超过 5 万个,且文件大小不得超过 10 MB
。如果您的sitemap
超过了这些限值,请将其拆分为几个小的sitemap
。这些限制条件有助于确保您的网络服务器不会因提供大文件而超载。一个站点支持提交的sitemap
文件个数必须小于5万个
下面从 百度站长平台 复制的几项QA:
Q:我提交时填写的周期是什么含义?
A:百度Spider会参考设置周期抓取Sitemap文件,因此请根据Sitemap文件内容的更新(比如增加新url)来设置。请注意若url不变而仅是url对应的页面内容更新(比如论坛帖子页有新回复内容),不在此更新范围内。Sitemap工具不能解决页面更新问题。
Q:Sitemap提交后,多久能被百度处理?
A:Sitemap数据提交后,一般在1小时内百度会开始处理。在以后的调度抓取中,如果您的sitemap支持etag,我们会更频繁抓取sitemap文件,从而及时发现内容更新;否则抓取的周期会比较长。
Q:提交的Sitemap都会被百度抓取并收录吗?
A:百度对已提交的数据,不保证一定会抓取及收录所有网址。是否收录与页面质量相关。
Q:我可以压缩我的 Sitemap 吗?它们是否需要用 gzip 压缩?
A:可以。请使用 gzip 压缩 Sitemap。无论压缩与否,Sitemap 应该小于 10MB(10,485,759字节)。
Q:XML格式的 Sitemap 中,“priority”提示会影响我的网页在搜索结果中的排名吗?
A:不会。sitemap
中的priority
提示只是说明该网址相对于您自己网站上其他网址的重要性,并不会影响网页在搜索结果中的排名。
Q:网址在 Sitemap 中的位置是否会影响它的使用?
A:不会。网址在 Sitemap 中的位置并不会影响百度对它的识别或使用方式。
Q:Sitemap中提交的url能否包含中文?
A:因为转码问题建议最好不要包含中文。
html格式
本小结暂待补充。
sitemap索引格式
如需提交大量sitemap文件,则可将其列在sitemap索引文件中,然后将该索引文件提交。
因为这个我几乎不会用到,所以懒得研究,有兴趣的参考这里。
如何制作网站地图
可以采用一些第三方工具来制作,也可以自己写个简单的爬虫去爬自己的网站,如果网站内容链接比较单一,也可以自己直接查数据库拼接。
因为我需要网站有内容更新时自动更新网站地图,而且存在多种二级域名,很多第三方工具都无法满足,所以我还是自己来生成比较好。方法就是先将已知的链接放入一个集合,然后再将博客所有列表页面、标签页面、分类列表页面、所有文章链接全部通过查询数据库一次性得到并最终自己拼接字符串生成xml文件,然后放到网站根目录。当然,并不推荐这种做法。
由于我没有找到比较好用的、能满足我需求的生成工具,所以这里就不推荐了,大家有好用的值得推荐的欢迎评论指出。
提交到搜索引擎
生成好后最好还要主动提交给搜索引擎,增加被收录的概率和速度。
百度提交站点地图
百度提交sitemap地址:http://zhanzhang.baidu.com/linksubmit/index
谷歌提交站点地图
谷歌提交sitemap地址(需要先登录谷歌站长平台):https://www.google.com/webmasters
参考资料
http://zhanzhang.baidu.com/college/courseinfo?id=267&page=2
【转载文章务必保留出处和署名,谢谢!】
网站地图,又叫站点地图,它就是一个列出了你网站上所有页面地址的清单文件,一般来说分为2种,一种是给搜索引擎看的,一种是给用户看的,前者帮助搜索引擎更好地收录你的网站,后者帮助用户更好的了解你的网站整体结构、更快的找到他们想要找的内容。本文讲的主要是前者。
站点地图格式
一般有3种格式,txt、xml、html,绝大部分情况下都是用xml格式,百度、谷歌都是支持xml格式。下面简单介绍3种格式。
txt格式
这种格式最简单,一般较少采用,示例如下:
sehmu.com
https://sehmu.com/
https://www.sehmu.com/
注意事项:
- 文本文件每行都必须有一个网址。网址中不能有换行。
- 不应包含网址列表以外的任何信息。
- 您必须书写完整的网址,包括 http。
- 每个文本文件最多可包含 50,000 个网址,并且应小于10MB(10,485,760字节)。如果网站所包含的网址超过 50,000 个,则可将列表分割成多个文本文件,然后分别添加每个文件。
- 文本文件需使用 UTF-8 编码或GBK编码。
xml格式
示例sitemap.xml如下:
Sitemap | Last Modified |
---|---|
https://www.sehmu.com/post-sitemap.xml | 2024-03-31 14:05 +00:00 |
https://www.sehmu.com/page-sitemap.xml | 2024-03-28 14:01 +00:00 |
https://www.sehmu.com/category-sitemap.xml | 2024-03-31 14:05 +00:00 |
https://www.sehmu.com/post_tag-sitemap.xml | 2024-03-31 14:05 +00:00 |
XML Sitemap
URL | Images | Last Mod. |
---|---|---|
https://www.sehmu.com/ | 0 | 2024-03-31 14:05 +00:00 |
https://www.sehmu.com/243.html | 0 | 2024-03-09 03:59 +00:00 |
https://www.sehmu.com/239.html | 0 | 2024-03-09 03:59 +00:00 |
https://www.sehmu.com/235.html | 0 | 2024-03-09 03:59 +00:00 |
https://www.sehmu.com/99.html | 0 | 2024-03-09 04:02 +00:00 |
https://www.sehmu.com/92.html | 0 | 2024-03-09 04:03 +00:00 |
https://www.sehmu.com/69.html | 0 | 2024-03-09 04:03 +00:00 |
https://www.sehmu.com/45.html | 0 | 2024-03-09 04:03 +00:00 |
https://www.sehmu.com/94.html | 0 | 2024-03-09 04:03 +00:00 |
https://www.sehmu.com/947.html | 1 | 2024-03-28 07:48 +00:00 |
https://www.sehmu.com/945.html | 1 | 2024-03-28 07:50 +00:00 |
https://www.sehmu.com/943.html | 1 | 2024-03-28 07:52 +00:00 |
https://www.sehmu.com/939.html | 1 | 2024-03-28 07:54 +00:00 |
https://www.sehmu.com/937.html | 1 | 2024-03-28 07:55 +00:00 |
https://www.sehmu.com/934.html | 1 | 2024-03-28 07:56 +00:00 |
https://www.sehmu.com/932.html | 1 | 2024-03-28 07:56 +00:00 |
https://www.sehmu.com/929.html | 1 | 2024-03-28 07:58 +00:00 |
https://www.sehmu.com/908.html | 1 | 2024-03-28 07:58 +00:00 |
https://www.sehmu.com/902.html | 1 | 2024-03-28 07:59 +00:00 |
https://www.sehmu.com/896.html | 1 | 2024-03-28 08:00 +00:00 |
https://www.sehmu.com/893.html | 1 | 2024-03-28 08:03 +00:00 |
https://www.sehmu.com/879.html | 1 | 2024-03-28 08:04 +00:00 |
https://www.sehmu.com/866.html | 1 | 2024-03-28 08:05 +00:00 |
https://www.sehmu.com/842.html | 1 | 2024-03-28 08:06 +00:00 |
https://www.sehmu.com/971.html | 1 | 2024-03-28 08:10 +00:00 |
https://www.sehmu.com/976.html | 1 | 2024-03-28 08:11 +00:00 |
https://www.sehmu.com/271.html | 1 | 2024-03-28 08:28 +00:00 |
https://www.sehmu.com/268.html | 1 | 2024-03-28 08:28 +00:00 |
https://www.sehmu.com/836.html | 1 | 2024-03-28 08:29 +00:00 |
https://www.sehmu.com/409.html | 1 | 2024-03-28 08:31 +00:00 |
https://www.sehmu.com/822.html | 1 | 2024-03-28 08:32 +00:00 |
https://www.sehmu.com/485.html | 1 | 2024-03-28 08:33 +00:00 |
https://www.sehmu.com/423.html | 1 | 2024-03-28 08:34 +00:00 |
https://www.sehmu.com/363.html | 1 | 2024-03-28 08:36 +00:00 |
https://www.sehmu.com/360.html | 1 | 2024-03-28 08:37 +00:00 |
https://www.sehmu.com/353.html | 1 | 2024-03-28 08:38 +00:00 |
https://www.sehmu.com/350.html | 1 | 2024-03-28 08:39 +00:00 |
https://www.sehmu.com/347.html | 1 | 2024-03-28 08:40 +00:00 |
https://www.sehmu.com/335.html | 1 | 2024-03-28 08:41 +00:00 |
https://www.sehmu.com/332.html | 1 | 2024-03-28 08:42 +00:00 |
https://www.sehmu.com/329.html | 1 | 2024-03-28 08:43 +00:00 |
https://www.sehmu.com/325.html | 1 | 2024-03-28 08:44 +00:00 |
https://www.sehmu.com/322.html | 1 | 2024-03-28 08:45 +00:00 |
https://www.sehmu.com/305.html | 1 | 2024-03-28 08:46 +00:00 |
https://www.sehmu.com/316.html | 1 | 2024-03-28 08:46 +00:00 |
https://www.sehmu.com/312.html | 1 | 2024-03-28 08:47 +00:00 |
https://www.sehmu.com/302.html | 1 | 2024-03-28 08:48 +00:00 |
https://www.sehmu.com/298.html | 1 | 2024-03-28 08:48 +00:00 |
https://www.sehmu.com/295.html | 1 | 2024-03-28 08:49 +00:00 |
https://www.sehmu.com/292.html | 1 | 2024-03-28 08:50 +00:00 |
https://www.sehmu.com/283.html | 1 | 2024-03-28 08:51 +00:00 |
https://www.sehmu.com/279.html | 1 | 2024-03-28 08:51 +00:00 |
https://www.sehmu.com/276.html | 1 | 2024-03-28 08:52 +00:00 |
https://www.sehmu.com/265.html | 1 | 2024-03-28 08:52 +00:00 |
https://www.sehmu.com/261.html | 1 | 2024-03-28 08:53 +00:00 |
https://www.sehmu.com/256.html | 1 | 2024-03-28 08:53 +00:00 |
https://www.sehmu.com/253.html | 1 | 2024-03-28 08:54 +00:00 |
https://www.sehmu.com/250.html | 1 | 2024-03-28 08:55 +00:00 |
https://www.sehmu.com/231.html | 1 | 2024-03-28 08:55 +00:00 |
https://www.sehmu.com/227.html | 1 | 2024-03-28 08:55 +00:00 |
https://www.sehmu.com/214.html | 1 | 2024-03-28 08:56 +00:00 |
https://www.sehmu.com/210.html | 1 | 2024-03-28 08:56 +00:00 |
https://www.sehmu.com/207.html | 1 | 2024-03-28 08:57 +00:00 |
https://www.sehmu.com/201.html | 1 | 2024-03-28 08:58 +00:00 |
https://www.sehmu.com/191.html | 1 | 2024-03-28 08:58 +00:00 |
https://www.sehmu.com/183.html | 1 | 2024-03-28 08:58 +00:00 |
https://www.sehmu.com/175.html | 1 | 2024-03-28 08:59 +00:00 |
https://www.sehmu.com/164.html | 1 | 2024-03-28 09:00 +00:00 |
https://www.sehmu.com/123.html | 1 | 2024-03-28 09:01 +00:00 |
https://www.sehmu.com/992.html | 1 | 2024-03-29 09:03 +00:00 |
https://www.sehmu.com/1346.html | 1 | 2024-03-29 09:04 +00:00 |
https://www.sehmu.com/1342.html | 1 | 2024-03-29 09:42 +00:00 |
https://www.sehmu.com/1339.html | 1 | 2024-03-29 09:44 +00:00 |
https://www.sehmu.com/951.html | 1 | 2024-03-29 09:50 +00:00 |
https://www.sehmu.com/1411.html | 1 | 2024-03-29 13:59 +00:00 |
https://www.sehmu.com/1437.html | 1 | 2024-03-29 14:33 +00:00 |
https://www.sehmu.com/1441.html | 1 | 2024-03-29 14:47 +00:00 |
https://www.sehmu.com/1446.html | 1 | 2024-03-29 15:29 +00:00 |
https://www.sehmu.com/1450.html | 1 | 2024-03-29 15:50 +00:00 |
https://www.sehmu.com/1457.html | 1 | 2024-03-29 16:20 +00:00 |
https://www.sehmu.com/1460.html | 1 | 2024-03-30 02:20 +00:00 |
https://www.sehmu.com/1463.html | 1 | 2024-03-30 02:35 +00:00 |
https://www.sehmu.com/1466.html | 1 | 2024-03-30 02:49 +00:00 |
https://www.sehmu.com/1469.html | 1 | 2024-03-30 03:42 +00:00 |
https://www.sehmu.com/1472.html | 1 | 2024-03-30 08:13 +00:00 |
https://www.sehmu.com/1476.html | 1 | 2024-03-30 08:32 +00:00 |
https://www.sehmu.com/1482.html | 1 | 2024-03-31 07:45 +00:00 |
https://www.sehmu.com/1486.html | 1 | 2024-03-31 14:05 +00:00 |
其中:
-
lastmod
表示本网页最后修改时间,必须是ISO-8601
时间格式,具体这个格式是什么样的没整清楚,根据我的理解,反正就当成是:yyyy-MM-ddTHH:mm:ss+08:00
,最后面的+08:00
应该表示的是东八区; -
priority
用来指定此链接相对于其他链接的优先权比值,可选值 0.0-1.0,一般来说网站首页1.0,然后二级三级页面依次降低,具体这个属性有多重要不太清楚。
一个sitemap
文件包含的网址不得超过 5 万个,且文件大小不得超过 10 MB
。如果您的sitemap
超过了这些限值,请将其拆分为几个小的sitemap
。这些限制条件有助于确保您的网络服务器不会因提供大文件而超载。一个站点支持提交的sitemap
文件个数必须小于5万个
下面从 百度站长平台 复制的几项QA:
Q:我提交时填写的周期是什么含义?
A:百度Spider会参考设置周期抓取Sitemap文件,因此请根据Sitemap文件内容的更新(比如增加新url)来设置。请注意若url不变而仅是url对应的页面内容更新(比如论坛帖子页有新回复内容),不在此更新范围内。Sitemap工具不能解决页面更新问题。
Q:Sitemap提交后,多久能被百度处理?
A:Sitemap数据提交后,一般在1小时内百度会开始处理。在以后的调度抓取中,如果您的sitemap支持etag,我们会更频繁抓取sitemap文件,从而及时发现内容更新;否则抓取的周期会比较长。
Q:提交的Sitemap都会被百度抓取并收录吗?
A:百度对已提交的数据,不保证一定会抓取及收录所有网址。是否收录与页面质量相关。
Q:我可以压缩我的 Sitemap 吗?它们是否需要用 gzip 压缩?
A:可以。请使用 gzip 压缩 Sitemap。无论压缩与否,Sitemap 应该小于 10MB(10,485,759字节)。
Q:XML格式的 Sitemap 中,“priority”提示会影响我的网页在搜索结果中的排名吗?
A:不会。sitemap
中的priority
提示只是说明该网址相对于您自己网站上其他网址的重要性,并不会影响网页在搜索结果中的排名。
Q:网址在 Sitemap 中的位置是否会影响它的使用?
A:不会。网址在 Sitemap 中的位置并不会影响百度对它的识别或使用方式。
Q:Sitemap中提交的url能否包含中文?
A:因为转码问题建议最好不要包含中文。
html格式
本小结暂待补充。
sitemap索引格式
如需提交大量sitemap文件,则可将其列在sitemap索引文件中,然后将该索引文件提交。
因为这个我几乎不会用到,所以懒得研究,有兴趣的参考这里。
如何制作网站地图
可以采用一些第三方工具来制作,也可以自己写个简单的爬虫去爬自己的网站,如果网站内容链接比较单一,也可以自己直接查数据库拼接。
因为我需要网站有内容更新时自动更新网站地图,而且存在多种二级域名,很多第三方工具都无法满足,所以我还是自己来生成比较好。方法就是先将已知的链接放入一个集合,然后再将博客所有列表页面、标签页面、分类列表页面、所有文章链接全部通过查询数据库一次性得到并最终自己拼接字符串生成xml文件,然后放到网站根目录。当然,并不推荐这种做法。
由于我没有找到比较好用的、能满足我需求的生成工具,所以这里就不推荐了,大家有好用的值得推荐的欢迎评论指出。
提交到搜索引擎
生成好后最好还要主动提交给搜索引擎,增加被收录的概率和速度。
百度提交站点地图
百度提交sitemap地址:http://zhanzhang.baidu.com/linksubmit/index
谷歌提交站点地图
谷歌提交sitemap地址(需要先登录谷歌站长平台):https://www.google.com/webmasters
参考资料
http://zhanzhang.baidu.com/college/courseinfo?id=267&page=2
机房租用,北京机房托管,大带宽租用,IDC机房服务器主机租用托管-价格及服务咨询 www.e1idc.net