随着百度平台的开放,很多站长开始创建sitemap.xml提交给百度,用来提高网站收录,很多站长在忙着创建sitemap.xml,今天为大家分享织梦DEDECMS如何创建sitemap.xml,有需要的小伙伴可以参考一下:

织梦本身有sitemap.xml创建功能,不过不太用,下面介绍的sitemap.xml符合百度sitemap.xml收录的标准!

织梦DEDECMS创建sitemap.xml步骤:

1:创建sitemap.xml文件,并放入模板文件夹中:

sitemap.xml里面的代码为:

<?xml version="1.0" encoding="UTF-8" ?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.9">
<url>
  <loc>https://freexyz.cn/</loc>
  <lastmod>{dede:arclist row=1 titlelen=24 orderby=pubdate}[field:pubdate function=strftime('%Y-%m-%d',@me)/]{/dede:arclist}</lastmod>
  <changefreq>dAIly</changefreq>
  <priority>1.0</priority>
</url>
{dede:channel row='23' type='top'}
<url>
  <loc>https://freexyz.cn{dede:field name='typeurl'/}</loc>
  <changefreq>daily</changefreq>
  <priority>0.8</priority>
</url>
{/dede:channel}
{dede:arclist row=2000 orderby=pubdate}
<url>
   <loc>https://freexyz.cn[field:arcurl/]</loc>
   <lastmod>[field:pubdate function=strftime('%Y-%m-%d',@me)/]</lastmod>
   <changefreq>monthly</changefreq>
   <priority>0.5</priority>
</url>
{/dede:arclist}
</urlset>

创建好文件之后,把sitemap.xml放入模板文件夹中。

温馨提示:记得把网址改为自己的网址哦!

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。