我的网站中有一个网址,显示最近更新的链接。
www.example.com/recent_update_post
在这个页面中,它包含大约 100 个链接,具体取决于每次更新的帖子数量,我是第一次使用站点地图。
所以我的问题是,这样做 Google 会抓取 www.example.com/recent_update_post
以及页面中的整个链接吗?
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>www.example.com/recent_update_post</loc>
<changefreq>hourly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
如果不是,这意味着每次我的内容发生这样的变化时我都必须动态创建xml文件?
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>www.example.com/post/1</loc>
<lastmod>2005-01-01</lastmod>
<changefreq>hourly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>www.example.com/post/2</loc>
<lastmod>2005-01-01</lastmod>
<changefreq>hourly</changefreq>
<priority>0.8</priority>
</url>
...
<url>
<loc>www.example.com/post/100</loc>
<lastmod>2005-01-01</lastmod>
<changefreq>hourly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
最佳答案
使用这个https://github.com/pawelantczak/php-sitemap-generator 此类可用于生成站点地图并通知搜索引擎更新。
关于php - 如何创建 sitemap.xml 来告诉 Googlebot 抓取更新的内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30664211/