隨著百度平臺的開放,很多站長開始創建sitemap.xml提交給百度,用來提高網站收錄,很多站長在忙著創建sitemap.xml,今日跟版網可樂分享織夢DEDECMS如何創建sitemap.xml。
導火索:百度作為中國第一大搜索,相繼推出了綠蘿算法和互聯網生態,K了大批的網站,在站長中口碑中略受影響,站長普遍認為百度是封閉的偏盈利性的組織,百度最近段時間,開放了透明了很多SEO常識和工具,用來撫慰受傷的站長。
織夢本身有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>http://www.genban.org/</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>http://www.genban.org{dede:field name='typeurl'/}</loc>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
{/dede:channel}
{dede:arclist row=2000 orderby=pubdate}
<url>
<loc>http://www.xiuzhanwang.com[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放入模板文件夾中。
溫馨提示:記得把網址改為自己的網址哦!
2:接著更新網站首頁,設置如下圖:
方法很簡單,方便修改,廣大織夢CMS愛好者記得多分享!