Skip to content
Enjoy 20% off for 12 months on all plans. Use promo code: HYPERGROWTHClaim it

Sitemap XML Best Practices: Priority, Changefreq and Lastmod Explained

By Toy Wen Da, Co-Founder · Updated · 7 min read · scored 92/100

Sitemap XML best practices come down to a short list. Include only canonical, indexable URLs, keep the lastmod date honest, and don't spend time on priority or changefreq, which Google treats as hints it mostly ignores. Audit what's already in your sitemap before you add any tags to it.

Flat illustration of three stacked pages with ascending priority bars, calendar wheels showing update frequency cycles,.

Start by checking what's in your sitemap

Flat illustration of a website with pages streaming right, some bright with checkmarks, others dimmed to show missing.

Look at the file itself before you touch any settings. SearchBlueprint's free XML sitemap generator crawls your site and shows the URL list it would produce, including which pages it picks up, which are missing and whether redirected or blocked pages have crept in. Compare that output against your live sitemap.xml before you change anything in your CMS.

Most sitemap problems have little to do with XML syntax. They come from which URLs ended up in the file in the first place.

How to fix your sitemap inside your own site

Flat illustration of a toggle switch flipped on above stacked content boxes with arrows flowing into a gridded sitemap.

If you're on WordPress

Most WordPress sites generate their sitemap through an SEO plugin rather than by hand. In Yoast SEO, the sitemap toggle lives under the plugin's general settings, in the section that controls site features, and turning it on gives you an automatically updated sitemap index. Rank Math works the same way: once the sitemap feature is active, a dedicated settings area lets you choose which content types, such as posts, pages or categories, get their own sub-sitemap.

Either plugin regenerates the file every time you publish or update a page, so lastmod stays accurate without any effort from you.

If you're on Shopify, Wix or a custom CMS

Shopify and Wix both generate a sitemap automatically at a fixed URL and give you no manual control over individual tags, so your job is to confirm it exists and isn't blocked. On a custom-built or headless site, your developer needs to generate the sitemap dynamically from the database of published, indexable pages. A static file someone edited by hand months ago won't do.

Submitting the sitemap and updating robots.txt

Once the file is correct, two steps help Google find it:

  1. Add the sitemap's location to your robots.txt file, so any crawler that checks it first knows where to look.
  2. Submit the sitemap URL in Google Search Console, under the Sitemaps section, so you can monitor indexing status over time.

Google is direct about the limits here: using a sitemap "doesn't guarantee that all the items in your sitemap will be crawled and indexed." Submitting one just removes a reason for a page to go undiscovered.

Priority, changefreq and lastmod: what each tag does

A woman holding a compound bow aims during archery practice indoors, a picture of skill and concentration.

These three optional child tags sit inside every <url> block and cause most of the confusion about sitemaps. The lastmod value must follow the W3C Datetime specification, the same ISO 8601-based standard used across web protocols.

Tag What It Tells Google Does Google Use It Recommendation
lastmod The date the URL's content last changed, in W3C datetime format Yes, helps Google judge content freshness and recrawl priority Keep accurate and automated; never set it to "today" on every page
changefreq How often you expect the page to change (always, hourly, daily, weekly, monthly, yearly, never) Largely ignored; treated as a loose hint at best Leave it to your CMS's default or skip it entirely
priority A 0.0–1.0 score of how important you consider the URL relative to others on your site Effectively ignored by Google Not worth manually curating; don't waste time hand-tuning this

Only lastmod is worth getting right. changefreq and priority are legacy parts of the sitemap protocol that search engines never leaned on heavily, and the sitemaps.org protocol still listing them as valid doesn't make them worth tuning.

When your CMS's tools are enough, and when they're not

A built-in CMS sitemap, or a quick run through a free checker, is plenty when:

  • You're checking a single URL that's missing from search results and want to confirm it's in the sitemap.
  • You just published a page and want to verify the next automatic regeneration picked it up.
  • Your site has a few hundred pages, good internal linking, and a plugin like Yoast or Rank Math already handling generation.

It stops being enough when:

  • You're auditing a site with thousands of URLs and need to see which pages are indexable and which are blocked, redirected or duplicate. At that scale a one-off manual check misses patterns.
  • The problem keeps coming back: pages drop out of the sitemap after a migration, a redesign or a CMS change, and nobody is tracking why.
  • You need to cross-reference sitemap inclusion against actual Search Console indexing data rather than just confirm the file exists.

A large site with a thin internal link structure benefits most from active sitemap monitoring, and so does a new site with few external links pointing to it. Google itself lists these as the cases where a sitemap carries more weight.

Common sitemap XML mistakes to avoid

Mistake Why It's a Problem Fix
Listing non-canonical or redirected URLs Sends Google to the wrong version of a page, wasting crawl attention Include only 200-status, canonical URLs
Forgetting to update the sitemap after a migration Old URLs linger; new ones never get submitted Regenerate and resubmit the sitemap as part of your migration checklist
Omitting important pages Pages without strong internal links may go undiscovered Cross-check your sitemap against your full indexable URL list
Never submitting to Google Search Console Removes one of the simplest discovery signals available Submit the sitemap URL and monitor it under Search Console's Sitemaps report
Hand-building a sitemap manually Easy to miss UTF-8 encoding, exceed the 50,000-URL cap, or leave out new pages Use a plugin or generator that rebuilds the file automatically

Duplicate title tags cause a related but separate problem: Google can see two "different" URLs in your sitemap that serve near-identical content. If that's happening on your site, fix the underlying title tag duplication before you worry about sitemap tags at all.

Mobile and image sitemaps

A mobile XML sitemap isn't a separate file in most modern setups. If your site is responsive, with the same URL serving desktop and mobile, your one sitemap already covers it. Separate mobile sitemaps mattered mainly for dedicated mobile-URL setups such as an m. subdomain, which most sites have retired.

Image sitemaps are different, and worth building deliberately if images matter to your traffic, as with product photos, infographics or editorial images that could show up in Google Images. Building an image sitemap Google will actually read covers the exact tag structure, so you don't have to cram image tags into your main file by hand.

FAQs

Does sitemap priority actually affect my Google ranking?

No. Priority is a self-reported 0.0–1.0 value you set, and Google doesn't use it as a ranking signal. Google said as much as early as 2008.

What's the correct changefreq for a blog post versus a static page?

If you set it at all, "weekly" is a reasonable default for blog posts and "monthly" works for static pages like About or Contact. Google largely ignores the tag, so getting it slightly wrong won't hurt you.

How many URLs can one XML sitemap file hold?

Up to 50,000 URLs, and the uncompressed file must stay under 50MB. Once you exceed either limit, split the content into multiple sitemaps and list them in a sitemap index file.

Do I need a separate mobile XML sitemap?

Only if your site still serves a separate mobile URL structure, like an m. subdomain. If your site is responsive and uses the same URLs for desktop and mobile, one sitemap covers both.

Will submitting my sitemap guarantee my pages get indexed?

No. Google is explicit that using a sitemap doesn't guarantee every URL in it gets crawled and indexed. A sitemap improves discovery and efficiency, but it doesn't override quality or crawlability problems on the page itself.

Run your sitemap through a real check

List the right canonical URLs, keep lastmod honest and stay under the size caps, and you've covered the bulk of what matters. If you want to see where your own sitemap stands against these rules, talk to the team for a sample report showing what's in your file today.

Related reading: Submit XML Sitemap to Bing: Fix Missing Pages in Minutes.

See what this looks like on your own siteEnter your website. You get the searches your buyers make and the page that should answer each one.

Sources

About the author

SearchBlueprint researched, wrote and scored this article with the content pipeline our customers run on their own sites. The score in the byline is what our content engine gave this page before it published. Nothing here is reviewed by hand, which is the point: it is the product's output, published where anyone can check it.