← Insights & Blog
SEO

Dynamic XML sitemap: how new database pages are discovered

A database-driven sitemap can include newly published articles automatically, but only when its query, URLs and HTTP responses are correct.

Published on 17/10/2026
Concepty editorial illustration: Dynamic XML sitemap: how new database pages are discovered

A sitemap need not be a manually edited XML file. A PHP endpoint can query published database records each time it generates output, or serve an up-to-date cached response. The key is to represent the canonical pages accurately.

Understand dynamic output versus a static file

A route such as /sitemap.xml may be handled by application code, not by a physical file on disk. After an article import, the endpoint can include new rows without a separate regeneration button. Confirm the actual route and whether caching delays updates.

Include only useful canonical URLs

Select published and indexable content. Exclude drafts, restricted pages, duplicate filters and unnecessary parameters. Use absolute production URLs, not local development addresses. For multilingual sites, list the intended language pages correctly and avoid advertising missing translations.

Use credible modification dates

lastmod should correspond to meaningful content updates, not the current time on every request. Pull a reliable timestamp from the database where possible, and ensure time zone handling is consistent. Incorrect dates make the signal less useful.

Validate XML, HTTP and caching

The response should return appropriate XML content type and a successful HTTP status. Escape URL characters properly and respect XML limits. Check whether server or application caches continue serving an older sitemap after an import.

Submit without expecting automatic rankings

A sitemap helps discovery but does not force indexing or ranking. Reference it from robots.txt when appropriate and submit it through Search Console. Continue checking canonical tags, internal links and page quality independently.

Verify after a SQL import

Publish a test article, open the sitemap endpoint, locate its canonical URL and check whether draft records are absent. Repeat after changing the slug or status. If nothing changes, inspect query filters, cache and routing before assuming that a scheduled generator is missing.

Frequently asked questions

Must there be a physical sitemap.xml file?

No. A dynamic route can serve valid XML and remain fully functional.

Does a sitemap guarantee Google indexes every page?

No. It provides discovery hints, while indexing decisions depend on multiple signals.

Related guides on Concepty

For a specific implementation or compatibility question, explore Concepty services or contact Concepty.

Official documentation and references