Paj Digital Labs
All articles
Digital Growth & Marketing

XML Sitemaps for Growing Blogs: Publish the URLs You Actually Want Indexed

A sitemap is a discovery signal, not an index guarantee. Include canonical public pages, use honest modification dates and keep drafts, errors and redirect URLs out of the feed.

Paj Digital Labs 3 min read
Analytics charts and planning notebook on a desk
Editorial illustration · Digital Growth & Marketing

A sitemap generator walks every route and publishes the list. It includes management screens, drafts, redirects and pages marked noindex. The file is syntactically valid, but its publishing policy is incoherent.

Sitemaps help search engines discover URLs you want considered for indexing. They do not override access controls, robots directives, canonical choices or quality decisions. The useful sitemap reflects the site's actual public catalogue.

Define eligibility

Include public canonical URLs that return successful content and are intended for indexing. Exclude private pages, unpublished articles, duplicate parameter variants, redirect sources and error pages.

Derive eligibility from the same publishing source that drives the public site. A second manually maintained list will eventually disagree with article status or URL changes.

If scheduled content is not yet public, do not expose it in a sitemap early. Publishing metadata can leak a planned title even when the full page is protected.

Use absolute canonical URLs

Sitemap loc entries need the correct absolute URLs for the deployed site. A preview hostname or local address should not survive into production output.

xml
<?xml version=class="text-code-string">"1.0" encoding=class="text-code-string">"UTF-8"?>
<urlset xmlns=class="text-code-string">"http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/blog/example-guide</loc>
    <lastmod>2026-11-12</lastmod>
  </url>
</urlset>

This is an illustrative domain and date. Escape XML characters correctly through a maintained serializer or carefully tested output routine. A URL containing an ampersand must not break the document.

Keep canonical links, internal links and sitemap URLs aligned. Publishing both slash and non-slash variants without a deliberate policy creates unnecessary ambiguity.

Make lastmod honest

Use the date of a meaningful page update when you can track it accurately. Do not assign today's date on every request or deployment if the article did not change.

A global footer update is not necessarily a meaningful article revision. Define which edits update the article modification record, and keep that value with the editorial data.

If you cannot provide a reliable date, omission is better than a misleading value. Sitemap metadata should express known facts, not simulated freshness.

Split only when useful

The sitemap protocol has limits on URL count and uncompressed file size. Check current protocol guidance and use a sitemap index when the catalogue approaches those limits.

A small blog does not need one file per article. Splitting by content type or another operationally useful group can help diagnose coverage, but unnecessary fragmentation adds maintenance.

Generate files deterministically and ensure updates cannot leave an index pointing to missing child files. Use an atomic publication approach when the deployment system requires it.

Validate more than XML syntax

  • Every URL is public — Avoid leaking private catalogue metadata
  • Final status is successful — Exclude redirects and errors
  • Canonical matches policy — Avoid duplicate signals
  • No noindex directive — Avoid contradictory publishing intent
  • Correct hostname — Prevent preview URLs reaching search engines
  • Accurate modification data — Preserve trustworthy update signals

Crawling every URL can be expensive on a large site. Use appropriate caching, incremental checks and representative verification, but do not skip the eligibility rule itself.

Ensure the sitemap endpoint has the intended content type and is publicly reachable. A file behind site authentication cannot fulfil ordinary public discovery.

Submit and observe

Reference the sitemap through the supported robots.txt directive and submit it through the search platform's tools where useful. Submission is not a request that every page must be indexed.

Review processing errors and compare discovered URLs with the eligible catalogue. Investigate exclusions in the context of canonical selection, page quality and crawl behaviour rather than adding more sitemap files blindly.

Do not treat an indexed count as a direct measure of business success. A well-indexed page still needs to answer a real reader question.

Keep removals consistent

When a page is removed or redirected, update the sitemap along with routing and internal links. Leaving old URLs in the file can prolong confusing signals and waste crawling.

Keep the generation process tied to publication changes and test draft exclusion explicitly. A sitemap that remains correct as the site grows is more valuable than one that was perfect on launch day.

The sitemap should be a concise statement of intent: these are the public canonical pages we want discovered. Its quality comes from that policy and the consistency of the site behind it, not from how many optional fields you can populate.

Paj Digital Labs

The engineering journal of Paj Digital Solutions — hosting, server infrastructure and web engineering, written by the people who run the servers.

Related reading