SEOArchive edition6 min read

A sitemap that reflects the site you actually publish

Use a sitemap to describe preferred, indexable routes rather than every generated file.

A network of connected nodes and branching routes — A sitemap that reflects the site you actually publish
Original ARTware computational illustration.

A sitemap is a concise representation of the pages a publisher wants to make discoverable. It need not mirror the directory full of files produced during a build. A journal may contain thumbnails, stylesheets, preview pages, filter controls and a special error document, none of which belongs in the XML list of preferred article destinations. Even a small static website benefits from distinguishing publication records from output files. Without that distinction a newly generated sitemap can advertise pages that cannot be opened, list duplicate representations of the same document, or omit material because its physical file name does not match an assumed pattern. The solution is to start with the site's model of what is published.

Determine which records have public routes

Consider a hypothetical technical site that contains a home page, fifteen service pages, an editorial index, six topic categories, sixty articles and an about page. The resulting set of principal HTML destinations has eighty-four entries. The actual output directory may contain hundreds of files because each article has illustrations and an alternate preview size. A navigation map may also contain routes for a friendly error page or an obsolete document that redirects. Counting files is therefore not a reliable method of counting pages. Establish an inventory based on distinct, published content records and the supporting indexes that visitors can actually use.

Give each record a field that establishes whether it belongs in the discoverable collection. An article draft, a preview created for editors and an intentionally excluded route should not be included just because a build can render an HTML file for it. Similarly, the journal category index may not have a conventional article record, yet it is a meaningful destination where readers can browse a subject. Make those additional routes explicit. If the site has several language versions, include the actual published records for each language rather than imagining that a translation exists whenever a source document exists. A sitemap is a statement about the public result, not a schedule of planned work.

Derive addresses from one preferred route model

The value of each location entry is the public canonical URL, not necessarily the path where the build stores its corresponding file. A directory-style address such as '/journal/curves/' may be served by a physical file called 'journal/curves/index.html'. If the preferred address ends with a slash, use that form consistently. Add the preferred scheme and hostname according to deployment settings. This prevents the build from advertising temporary preview domains, alternate hostnames or inconsistent extension-based routes. The visible page should identify the same preferred address in its head, and other pages should link to that address.

As the publisher changes the site structure, old aliases can remain necessary. An older article path might redirect permanently to a consolidated article that serves the same purpose. Remove that older path from the publication list and put it in a separate redirect inventory. This is not the same as deleting it from the server's routing behavior. Visitors requesting it can still get to the surviving document. The sitemap should instead describe the final result to which current links point. Keeping redirects as a separate collection also makes it possible to review them for loops, chains and inappropriate destinations without mixing them up with actual pages.

Related reading: Handling URLs when navigation changes.

Choose useful modification dates

The optional last modification value is meaningful when it indicates a real update to the relevant page. It need not equal the moment when a build process encountered the file. A site regenerated every night might otherwise announce that all articles have changed even when it has produced the same output for weeks. Store a modification date with the publication record and update it when its substantive material or essential information changes. A spelling correction may or may not require a new date depending on the publisher's convention. A rewritten section with a new technical example clearly represents a meaningful change.

Distinguish an original publication date from the last revision of the contents. If an article published in 2022 receives a substantial technical correction in 2026, its archive position need not become that of a new article, although its revision date can reflect the change. The same concept applies to service pages, where a change in the deliverable or scope may be meaningful even if the layout stays the same. Use a consistent date representation and validate it. Avoid impossible values and dates in the future. When no reliable modification date is available, it is better to omit this optional information than to manufacture precision.

Layered flowing curves with fine network-like intersections
ARTware visual study. A complementary computational composition.

Generate simple, valid XML

A conventional XML sitemap needs a document root identifying the sitemap format and location entries for the published URLs. Each entry should contain the complete absolute URL. Text values need correct escaping. A route containing characters that have meaning in XML must be serialized appropriately rather than pasted into a string without processing. The simplest implementation for a small publication can use a standard XML serializer or a carefully validated template. Avoid extra fields that have no use in the publishing workflow. The point is to express the inventory reliably, not maximize the number of annotations attached to every location.

Keep the sitemap at a stable, known address. The site can announce its location in the robots document, enabling consumers to find it without learning an application's private folder structure. Ensure that this endpoint returns the correct content and is not accidentally routed through a general article template. The XML itself is a public technical document, not a regular index page. A human-readable site map may be useful as an additional navigation page, especially when the content library is larger, but its layout and grouping serve a different job. Both can look up addresses from the same published route inventory.

Compare the inventory with the released website

After a release, parse the XML and collect the location values into a set. Compare them with the expected preferred URLs constructed from the publication records. Check for duplicates and identify unexpected omissions. Then request a selection, or all of them for a small site, and record their response status. Any redirect in the sitemap deserves investigation: it may indicate an overlooked alias or inconsistent slash convention. Confirm that each page returns the expected heading or article rather than a generic error response with a successful status. Inspect the canonical declaration on a representative subset of each template type. The check should be against the actual deployment since routing details can differ from local development.

An illuminating test includes an article near the end of the archive, a new service page, the first category page and a deliberately excluded draft. The first should appear because age alone is not a reason to omit it. The second and third should resolve exactly as advertised. The excluded draft should be absent even if a preview system has produced a local file. Test a known old redirect as well and confirm that its destination, not the old location, appears in the final XML. These examples exercise distinct publishing and routing decisions rather than simply testing five random URLs that may all share the same template.

Split only when it serves the workflow

Large sites may organize sitemaps into separate files for meaningful areas of publication and reference those files from a sitemap index. This can reduce the difficulty of operating and validating large, separately maintained collections. A small journal with fewer than a hundred articles can usually use one understandable document. Splitting it into one file per category brings additional locations and references to validate, so there should be a reason beyond the appearance of sophistication. If the collection later expands greatly, its route inventory already provides the grouping information needed to generate an index. That is preferable to scattering separate, partially manual lists across the codebase.

The real benefit of this design appears over time. The publisher can add an article, revise a service or consolidate two similar documents and regenerate an accurate sitemap without editing a second independent file. A validation check can identify disagreement between the XML and released routes before it becomes a persistent structural issue. A sitemap will not compensate for inaccessible content, poor navigation or an absent preferred page. It does, however, make it easier for both maintainers and automated consumers to understand the set of documents the publisher actually offers.

Explore the implementation area: Technical SEO.