The sitemap protocol defines three optional tags that sit beside every URL: lastmod, changefreq and priority. Plugins and generators often fill all three on every page, usually with the same values. That looks thorough, but it is mostly noise. Search engines have said publicly that they treat the tags very differently, and one of them is worth getting right while two are not.
This guide is for site owners and developers who maintain a sitemap, or who have inherited one full of daily and 0.8 values. You will learn what each tag means in the protocol, what Google and Bing say they do with it, how to produce a trustworthy lastmod, and how to check your sitemap. You will end with a leaner file and a rule for keeping it honest.
Accurate sitemap tags do not raise rankings. At best they help crawlers decide when a known page may be worth fetching again. Google also says a sitemap does not ensure that listed URLs are crawled or indexed.
Before you begin
- Access: the ability to change how your sitemap is generated (CMS setting, plugin, framework code or a build script) and to read your sitemap file.
- Data needed: a trustworthy "last modified" value for each page. A CMS "updated" field is typical. If you cannot produce one, leave
lastmodout. - Time: under an hour for a small site; a development task for a custom generator.
- Risk: low. These tags are optional, so removing them does not break the file.
- Back up: save a copy of the current sitemap so you can compare the result.
- Start from a valid base: if your sitemap has other problems, fix them first with how to create an XML sitemap.
What each tag means
The Sitemaps protocol at sitemaps.org defines all three as optional.
lastmodis the date the page was last modified, in W3C Datetime format.YYYY-MM-DDis acceptable, and a full date and time with a time zone is also allowed. It should reflect the page's modification date, not the date the sitemap was generated.changefreqsays how often the page is likely to change. The allowed values arealways,hourly,daily,weekly,monthly,yearlyandnever. The protocol calls the value a hint, not a command, and says crawlers may visithourlypages less often than that, andyearlypages more often.priorityis a number from 0.0 to 1.0, with a default of 0.5. It describes importance relative to other URLs on your own site only. The protocol says it is unlikely to change search result rankings and warns that giving every URL a high priority does not help.
For sitemap index files, lastmod has a slightly different meaning: it gives the modification time of the listed sitemap file itself, which helps crawlers fetch only sitemaps that changed.
What Google and Bing say they do
Google uses lastmod, but only conditionally. Its documentation says it uses the value when it is consistently and verifiably accurate, for example when it can be checked against the page's actual last modification. The value should reflect the last significant update to the page. Google counts changes to main content, structured data or links as significant, and says a change of copyright date does not count. On the other two tags it is blunt: Google ignores priority and changefreq values.
Bing has published a study of sitemaps. Its Webmaster Blog says the date in lastmod must be the date the linked page was last modified, not when the sitemap was generated. The most common error in Bing's analysis was stamping every URL with the same date, and Bing says it may disregard dates that consistently show the current day. Shared dates are fine when several pages really were published or changed that day. Bing also reports that most changefreq and priority tags it saw were not set correctly, often the same value across a whole sitemap, and concludes that Bing largely disregards those fields. The post advises updating the value whenever a page changes and regenerating sitemaps regularly.
The practical reading: keep an honest lastmod, and treat the other two as optional decoration.
Step-by-step instructions
Step 1: Look at what your sitemap says today
Why: many sitemaps contain a single date on every line.
Action: download your sitemap and count how many distinct lastmod values it has, and what changefreq and priority values appear. This short script prints a summary.
import re, urllib.request, collections
xml = urllib.request.urlopen("https://www.example.com/sitemap.xml").read().decode()
dates = re.findall(r"<lastmod>(.*?)</lastmod>", xml)
print("urls:", xml.count("<url>"), "lastmod values:", len(dates), "distinct:", len(set(dates)))
print(collections.Counter(re.findall(r"<changefreq>(.*?)</changefreq>", xml)))
print(collections.Counter(re.findall(r"<priority>(.*?)</priority>", xml)))
If thousands of URLs share one or two dates, or every date is today, the lastmod is not carrying real information.
Confirm: you know whether your dates vary and whether changefreq and priority are uniform.
Step 2: Choose a real source for lastmod
Why: the value is only useful if it tracks real edits.
Action: use the date your CMS or database records when the page's content was last meaningfully edited. For file-based sites, the date of the last commit that touched the content file is a better source than the build time. For pages assembled from several records, such as a category page, take the most recent change among the items you want to count. If you have no reliable source, omit lastmod rather than guess.
Confirm: two pages you know were edited on different days show different dates.
Step 3: Define what counts as a significant change
Why: a date that moves on every tiny edit becomes unreliable.
Action: follow Google's wording. Update lastmod when the main content, structured data or links change in a way a visitor would notice. Do not update it for a footer year, a rotating banner, a view counter or a re-save with no changes. Write this rule in your project notes so the next developer follows it.
Confirm: a test edit to the footer does not move the date; a test edit to the body does.
Step 4: Output the right format
Why: malformed dates may be ignored.
Action: write W3C Datetime values, either date only or full timestamp with a time zone offset.
<url>
<loc>https://www.example.com/guides/glaze-basics</loc>
<lastmod>2026-10-14</lastmod>
</url>
<url>
<loc>https://www.example.com/news/library-budget</loc>
<lastmod>2026-10-29T07:30:00+00:00</lastmod>
</url>
Use the page's own modification date, not the sitemap generation date, and escape special characters in URLs.
Confirm: a validator or a quick parse accepts every date.
Step 5: Remove or stop worrying about changefreq and priority
Why: Google ignores them and Bing largely disregards them, so inaccurate values only add bytes and a false sense of control.
Action: turn these fields off in your generator or plugin. If a framework requires them or you prefer to keep them, leave them but do not spend time tuning. Frameworks differ: for example, Next.js lets a sitemap function return changeFrequency and priority as optional fields, and you can simply omit them. See Next.js SEO.
Confirm: the new file contains the URLs and, where known, lastmod.
Step 6: Set lastmod correctly in a sitemap index
Why: crawlers use the index's dates to decide which child sitemaps to fetch.
Action: for each <sitemap> entry, set lastmod to the time that child file last changed, which is usually the latest lastmod of any URL inside it. See sitemap indexes.
Confirm: an unchanged child sitemap keeps the same date across runs.
Step 7: Regenerate and re-check
Why: the value must track changes over time.
Action: regenerate when content changes, not only on a schedule that touches every date. Re-run the script from Step 1. Submit or resubmit the sitemap in Search Console and watch the Sitemaps report for errors. If you also want to tell Bing quickly about new or changed URLs, see IndexNow setup.
Confirm: the distinct date count roughly matches how many different days you edited content.
Final verification checklist
- Each
lastmodis the page's own last significant modification date. - Dates are not all identical and not all today.
- Dates use the W3C Datetime format.
- No
lastmodwas generated from the build time or the current time. - Footer or cosmetic changes do not move the date.
changefreqandpriorityare removed, or deliberately left alone.- Sitemap index entries show the child file's last change.
- The Sitemaps report in Search Console shows Success.
Common mistakes to avoid
- Setting every
lastmodto today. Bing says it may disregard such dates, and Google uses the value only when it proves accurate. - Using the sitemap generation date. Both the protocol and Bing say to use the page's modification date.
- Treating
priorityas a ranking lever. Google ignores it, and the protocol says it only compares URLs on your own site. - Tuning
changefreqper URL. It is a hint at best and Google ignores it. - Bumping the date for trivial edits. A copyright-year change is not a significant update.
- Listing non-canonical URLs because they have fresh dates. Dates cannot rescue URLs that should not be there.
- Forgetting the index file. Stale index dates can hide changed child sitemaps.
- Expecting a faster crawl. Accurate dates inform crawlers; they do not command them.
Frequently asked questions
Should I delete changefreq and priority?
You can. They are optional, Google ignores them and Bing largely disregards them. Leaving them does no harm if your tool insists, but time spent tuning them is wasted.
Does lastmod make Google recrawl a page?
Not by itself. Google says it uses lastmod when it is consistently and verifiably accurate. It does not describe the tag as a command to recrawl.
Is it better to omit lastmod than to guess?
Yes. Google uses lastmod only when it is consistently and verifiably accurate, so a guessed date works against you. Omit it where you have no reliable source.
Which date format should I use?
W3C Datetime. 2026-10-29 is acceptable, as is a full timestamp with a time zone, such as 2026-10-29T07:30:00+00:00.
What about Bing and other engines?
Bing's published guidance emphasises lastmod and says it largely disregards the other two. This guide has not verified how other search engines treat the tags.
Related guides
- How to Create a Valid XML Sitemap for Your Website
- Split Large Sitemaps into a Sitemap Index Without Errors
- Image, Video and News Sitemaps: When They Help and How to Build Them
- HTML Sitemap vs XML Sitemap: What Each Does and If You Need Both
- Set Up IndexNow for Bing and Participating Search Engines
- Next.js SEO: Metadata, Sitemaps and Rendering Choices That Work
Official references
- https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap
- https://www.sitemaps.org/protocol.html
- https://blogs.bing.com/webmaster/february-2023/The-Importance-of-Setting-the-lastmod-Tag-in-Your-Sitemap
- https://developers.google.com/search/docs/crawling-indexing/sitemaps/overview
Next step: See how Crawvix checks a website and capture a baseline once scanning opens. This guide provides technical information, not a guarantee of rankings, traffic or index inclusion.
Crawvix Editorial Team
· Published October 29, 2026 · Last updated October 29, 2026 · 8 min read