If a new Next.js blog post loads but is missing from the sitemap, compare three things: its exact public URL, the source of published posts, and the XML served by your production site. When the post is in the published source but not the XML, have your developer trace the sitemap’s URL source. Fix that source, deploy, and check the public XML again; a working article page alone does not prove its sitemap entry exists.
Compare the live post with the public sitemap
Start with a post that should be included. Copy its full production URL, including the actual domain, blog path, slug, and trailing-slash format. Open it in a browser, then open your production sitemap and inspect the XML for that exact address in a <loc> entry. Do not compare against a draft, a preview deployment, or a local sitemap: the question is what the public site serves now.
If the article URL fails to load, resolve that first with the Next.js blog post 404 guide. If it loads but the XML lacks it, record both URLs and continue to the sitemap’s inputs. A missing entry is evidence of a sitemap-output problem, not evidence that the post failed to publish.
Find where the sitemap gets its article URLs
Next.js supports either a static app/sitemap.xml or a programmatic app/sitemap.js or app/sitemap.ts whose default function returns sitemap URLs. Ask the developer which version the production branch uses. A static file needs its entries updated as posts are released; a programmatic sitemap needs an input that actually contains the posts intended for publication.
Compare the sitemap input with the source used to identify published articles. Look for a hard-coded slug array, an older content directory, a query that excludes recent posts, or a production build that did not receive the new data. The key question is not merely whether the slug exists somewhere in the repository; it is whether the sitemap’s deployed input includes it. Keep unpublished drafts out of the intended URL set.
Also ask when that input is read. Next.js documents its sitemap Route Handler as cached by default unless it uses a request-time API or dynamic configuration. If posts arrive after a build, the developer should determine whether the site expects a new build for each publication or an appropriately configured request-time source. Changing caching settings cannot repair a generator that reads the wrong post list.
Hand off a specific fix, then verify the release
Consider a fictional site where https://example.com/blog/new-guide loads and the published-post source contains the slug new-guide. The public sitemap at https://example.com/sitemap.xml lists older articles but not that URL. The developer finds that app/sitemap.ts builds blog entries from a separate, older array. For this case, the fix is to derive the blog entries from the published-post source, construct the site’s intended absolute article URLs, and release the changed sitemap generator. The expected output is a <loc> entry for https://example.com/blog/new-guide alongside the older published posts—not an entry added by hand to a different, unused file.
Send the developer the fields below so they can reproduce the mismatch and confirm the proposed source is the right one:
- Public article URL and result: the exact address that loads, plus the production environment checked.
- Public sitemap URL and result: the XML address inspected and the missing
<loc>value. - Published-post input: where the article appears as published, with its slug and the field that distinguishes published posts from drafts.
- Requested change and acceptance check: use that published-post input for sitemap blog URLs, preserve existing valid entries, deploy, then confirm the exact new URL appears in the public XML.
Check the deployed output—not just the code
Before release, the developer can check that the generator selects published posts and produces the intended absolute URLs. After the change deploys, reopen the public article and sitemap, inspect the XML, and compare the <loc> value character for character with the working article URL. If it is still absent, check which version deployed and what post data that version reads; do not mark the task complete because a local test passed.
Ranks supports automatic setup and publishing for Next.js App Router sites using TypeScript, and its product reference distinguishes a generated draft from a live deployment. That makes the public URL check relevant when publishing with Ranks, but the sitemap change here is a developer task: verify what your own site generates rather than assuming article publishing updated its XML.
A correct sitemap can help search engines discover a new URL, but Google says inclusion does not guarantee crawling or indexing. Once the public XML contains the article, the sitemap-output task is done. If the separate question is why Google has not indexed the page, use the blog post indexing guide rather than making further sitemap edits without evidence.



