Google’s John Mueller was asked about a technique designed to force Google and other search engines to crawl sitemaps every day. The person asking the question said they saw this in action on a large site.
Cache Busting With URL Parameters Is Legit
Websites have long used a technique called cache busting for CSS, JavaScript, and other files that may change. The purpose of cache busting is to prevent a site visitor’s browser from storing a stale copy of the CSS or JavaScript files, while also relying on stored cache files. The reason is because sometimes a site owner might make changes to the CSS or JavaScript file and rather than change the file name they just append a URL parameter to the end of the file name so that the freshest version is downloaded to site visitors.
This enables the website to load faster on a site visitor’s browser (by not having to load web page resources a second time) while also serving the freshest style, script, or image files.
The way to do that is by adding a question mark and additional parameters to the file.
Is Cache Busting A Sitemap Legit?
Apparently some SEOs are appending the URL parameters to their sitemaps in order to force search engines to crawl them, rather than rely on the <lastmod> XML element. The <lastmod> element communicates the last date that a file was modified. This tells a crawler whether or not a file has changed. If the file has not changed this enables the crawler to focus crawling pages that have changed.
Blusky member @seoharbour asked
“Hi John, I’ve been trying to learn some more about sitemap.xmls. Heard about this thing called cachebusting by adding a ?v=unix timestamp to the end of a sitemap url in a sitemapindex. In the Dev blog I could only find a comment on accurate <lastmod> values, I guess it applies too right?”
“Why would you use cache-busting in a sitemap file? Perhaps I’m misunderstanding what your goal is though, feel free to elaborate!”
“Fair question, I’ve observed this behavior on a large rigidly structured site. The child sitemap URLs inside the index get a fresh ?v=timestamp every day. I guess they want to force a refetch with a daily new URL. Since its the URL changing rather than lastmod, im wondering if this causes any harm?”
Don’t Use Cache Busting On Sitemaps
Google’s John Mueller responded that it’s a bad idea to use a cache busting URL parameter on a sitemap.
“I think that’s a bad idea because you’re signaling that the canonical URL for a piece of content should be constantly changing. That’s not good for search engines, it’s not good for your tracking. Having clean, stable URLs is important. (Cue the TBL page “Cool URIs don’t change”)”
SEO Influencer Hacks Gone Wrong
This kind of thing is what happens when an SEO influencer who doesn’t actually know SEO comes up with hacky ideas that sound good on paper but sound ridiculous to actual SEOs who know how markup languages (like XML and HTML) work. The acronym XML stands for, Extensible Markup Language. As a markup language it has rules that an SEO or site owner can follow in order to communicate to a crawler or any other site visitor. No hacks necessary.
