网站制作学习网网站优化→正文:google sitemap xml站点地图标准格式
字体:

google sitemap xml站点地图标准格式

网站优化 2024/3/28 21:26:37  点击:不统计


 在做seo中站点地图不可获取,但是xml格式多种,如何定义站点地图用的xml,下面是标准的google 站点地图

 
1.先看sitemap xml代码示例
 
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.forasp.cn/sitemap.xml">
  <url>
    <loc>http://www.forasp.cn/page1.html</loc>
    <lastmod>2024-03-28</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>http://www.forasp.cn/page2.html</loc>
    <lastmod>2024-03-27</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.6</priority>
  </url>
</urlset>
 
2. 看xml中的 key 注释
<loc>:URL 地址,指向页面的链接。
<lastmod>:页面上次修改的日期。这是可选的。
<changefreq>:指定页面内容更新的频率。可能的值包括 always、hourly、daily、weekly、monthly、yearly 和 never。
<priority>:指定页面的优先级。值的范围是 0.0 到 1.0,其中 1.0 是最高优先级。
 
3. 关于更新频率,根据实际情况
seasonly:每个季度更新一次。
fortnightly:每两周更新一次。
biannually:每半年更新一次。
quarterly:每季度更新一次。
annually:每年更新一次。

4. 视频 或者图片 xml 案例,之际取xml 中url 段为例 
<url>
    <loc>http://www.forasp.cn/page1.html</loc>
    <lastmod>2024-03-28</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
    <image:image>
      <image:loc>http://www.forasp.cn/image1.jpg</image:loc>
    </image:image>
    <video:video>
      <video:thumbnail_loc>http://www.forasp.cn/video-thumbnail.jpg</video:thumbnail_loc>
      <video:title>Example Video</video:title>
      <video:description>This is an example video.</video:description>
      <video:content_loc>http://www.forasp.cn/example-video.mp4</video:content_loc>
      <video:player_loc allow_embed="yes">http://www.forasp.cn/video-player.html</video:player_loc>
      <video:duration>600</video:duration>
      <video:publication_date>2024-03-01T12:00:00+00:00</video:publication_date>
    </video:video>
  </url>
  
  <image:image> 标签用于描述图片的信息。
<image:loc> 包含图片的 URL 地址。
<video:video> 标签用于描述视频的信息。
<video:thumbnail_loc> 包含视频的缩略图 URL 地址。
<video:title> 包含视频的标题。
<video:description> 包含视频的描述。
<video:content_loc> 包含视频文件的 URL 地址。
<video:player_loc> 包含视频播放器页面的 URL 地址,并指示搜索引擎是否允许嵌入该播放器。
<video:duration> 包含视频的持续时间(以秒为单位)。
<video:publication_date> 包含视频的发布日期。
 
以上就是标准的sitemap 地图xml 格式内容,根据自己的站点进行调节,优化。
 

转载%77%77%77请%2E%66%6F%72%61%73%70%2E%63%6E注明

·上一篇:PNG图片压缩,在线图片压缩 >>    ·下一篇:网站制作学习网
推荐文章
最新文章