Technical SEO
Why lastmod should come from real source history
Sitemaps can include a lastmod value for each URL. That value is supposed to communicate when the document was meaningfully modified. It is very easy to make the field useless.
The lazy implementation lies on every deployment
A common sitemap implementation sets every page's modification date to the current date during the build. Deploy a footer fix and suddenly every service page, article, location, case study, and legal page claims it changed today. The XML is valid. The signal is weak because it no longer describes the documents.
We already have a better source of history
Our websites live in Git. Git knows the most recent commit that touched a source file. Several of our repos use a prebuild script that asks Git for the latest commit timestamp for static route files and content files. The script normalizes those timestamps into dates and writes a last-modified map into the application.
The sitemap then reads from that map. This creates a useful relationship: If the source did not change, the sitemap date does not change merely because the site was redeployed.
Content and template changes are different
A dynamic page can be affected by more than its MDX file. If a case-study template changes, every case study may render differently even if the individual content files were untouched. Our sitemap logic can account for that by considering both the content item's modification date and the shared template's modification date, then using the later value.
That is a better representation of the actual document.
Why Git history is a strong default for repository content
Git is already authoritative for releases. Using it for lastmod means we do not need editors to maintain another date field just to tell the sitemap that a file changed. Editorial dates still have their own meaning. An article's publication date is a content fact. An explicit updated date can be a content fact when a meaningful revision should be visible to readers.
The Git-derived date is a technical fact about source modification. We keep those concepts separate.
It improves debugging too
Suppose search visibility changes after a set of updates. A real lastmod map gives us another way to reason about what actually changed around that time. It is not a ranking diagnostic by itself, but it keeps the crawl signal aligned with repository history.
A fake "today" timestamp on every URL tells us nothing.
New files need a fallback during the build
There is one practical wrinkle. During certain build environments, Git history for a newly created file may not be available in the same way as established files, or a shallow checkout may behave differently. Our scripts use a safe fallback date when they cannot resolve a valid commit timestamp.
The goal is graceful failure, not inventing precision that is not available.
Validation protects the map
The current connectrader SEO audit checks that content lastmod values use the expected date format and that important template sources exist in the map. Again, the interesting part is not the JSON file. The interesting part is that the release process can verify that the sitemap's date infrastructure is still connected.
A lastmod date is a hint, not a command
Search engines decide when to crawl. A recent date does not force immediate indexing, and an old date does not make a page unimportant. We treat lastmod as one honest signal in a larger technical system. That is why honesty matters.
Why not just maintain updated dates in frontmatter?
Sometimes we do. An article may expose an explicit updated date because the change is editorially significant and should appear in Article schema. That is different from requiring a human to edit an updated field every time a typo, image, internal link, or template changes.
Git history covers the technical modification layer automatically.
The larger philosophy
A sitemap should be generated from reality. The URLs should come from the actual content registries and route families. The canonical host should be the production domain. The lastmod values should come from meaningful source history. When the sitemap is assembled that way, it becomes an output of the site architecture instead of a separate document somebody has to remember to maintain.
That is how we want infrastructure to work.
From explanation to proof
Where this connects to the work
This category connects our search recommendations to implementation details that can be inspected, tested, and maintained.