隨著百度平臺的開放,很多站長開始創(chuàng)建sitemap.xml提交給百度,用來提高網(wǎng)站收錄,很多站長在忙著創(chuàng)建sitemap.xml,今日秀站網(wǎng)可樂分享織夢DEDECMS如何創(chuàng)建sitemap.xml。
導火索:百度作為中國第一大搜索,相繼推出了綠蘿算法和互聯(lián)網(wǎng)生態(tài),K了大批的網(wǎng)站,在站長中口碑中略受影響,站長普遍認為百度是封閉的偏盈利性的組織,百度最近段時間,開放了透明了很多SEO常識和工具,用來撫慰受傷的站長。
織夢本身有sitemap.xml創(chuàng)建功能,不過不太用,下面介紹的sitemap.xml符合百度sitemap.xml收錄的標準!
織夢DEDECMS創(chuàng)建sitemap.xml步驟:
1:創(chuàng)建sitemap.xml文件,并放入模板文件夾中,sitemap.xml里面的代碼為:
<?xml version="1.0" encoding="UTF-8" ?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.9"> <url> <loc>http://mengdiqiu.com.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>http://mengdiqiu.com.cn{dede:field name='typeurl'/}</loc> <changefreq>daily</changefreq> <priority>0.8</priority> </url> {/dede:channel} {dede:arclist row=2000 orderby=pubdate} <url> <loc>http://mengdiqiu.com.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> |
創(chuàng)建好文件之后,把sitemap.xml放入模板文件夾中。
溫馨提示:記得把網(wǎng)址改為自己的網(wǎng)址哦!
2:接著更新網(wǎng)站首頁,設(shè)置如下圖:
方法很簡單,方便修改,廣大織夢CMS愛好者記得多分享!