The lastmod field is used to indicate when a page was last updated. This is used by search engines to determine how often to crawl your site.
This should not change based on code changes, only for updating the content.
For example, if you have a blog post, the lastmod should be updated when the content of the blog post changes.
It's recommended not to use autoLastmod: true as this will use the last time the page was built, which does
not always reflect content updates.
Learn more https://developers.google.com/search/blog/2023/06/sitemaps-lastmod-ping
changefreq or priorityThese two fields are not used by search engines, and are only used by crawlers to determine how often to crawl your site.
If you're trying to get your site crawled more often, you should use the lastmod field instead.
Learn more https://developers.google.com/search/blog/2023/06/sitemaps-lastmod-ping
If your pages only change when you commit and deploy (not at runtime), you don't need runtime sitemap generation. Enable zeroRuntime to generate sitemaps at build time and remove ~50KB of sitemap code from your server bundle.
export default defineNuxtConfig({
sitemap: {
zeroRuntime: true
}
})
This is ideal for sites using nuxt build where content is static between deployments. If you're using a CMS that updates content without redeploying, you'll need runtime generation.
Learn more in the Zero Runtime guide.