Back

Google Sitemap

|

应某人要求,写出sitemap的用法。
sitemap被google解释为roboot.txt的升级,而roboot.txt则是引导google爬行机器人收录网站的一个协议。
一个基本的sitemap文件应该是以下格式:
`http://www.skylast.com
2006-07-05T14:50-17:10
always

1.0`
分行解释:
[code][/code]
本行定义了此sitemap的命名空间,相当于超文本标记语言中的〈html>,如果你问我这个标签有什么用,我不能告诉你它在某本书的哪一页。
[code][/code]
给出具体链接的入口,也是你希望展示在sitemap文件的链接。这是很sitemap的主体。
[code]http://www.lyt.ch[/code]
定义链接地址。
[code]...[/code]给出最后的更新时间,注意例子中的时间表述方法。
[code]...[/code]给出页面的更新频率,有"always", "hourly", "daily", "weekly", "monthly", "yearly",这些选项,自己看情况。
[code]
...[/code]看单词的意思大概是优先权,值介于0.0-1.0之间,据我观察没有什么用处,可以根据页面的重要性给出值。
剩下的和,用来关闭xml标签,类似和上面介绍的只是sitemap的一个段落,提交只是lyt.ch的首页。你可以在之后再添加一个〈URL>提交其他的页面,格式相同,最后以结尾。
sitemap文件可以使用任意文本编辑器生成,扩展名是.xml,编码必须选择utf-8.有一个官方的生成工具可以使用,但是别指望有多大帮助,一大堆英文已经够让人头疼,里面解释语言更让人云里雾里。

No comments yet

Leave a comment

About me

I live in Tasmania, an island a little far from the rest of the world and very close to the sea.
Father of two little girls, have two puppies.

Work

Work in IT industry, AI is my working partner.