Skip to content

Leave the API Servers pages out of the sitemap and the index - #5033

Merged
reakaleek merged 4 commits into
mainfrom
fix-sitemap-deleted-pages-a5863ed9
Nov 24, 2026
Merged

reakaleek merged 4 commits into
mainfrom
fix-sitemap-deleted-pages-a5863ed9

Conversation

@reakaleek

Copy link
Copy Markdown
Member

The API servers pages no longer appear in sitemap-api.xml, and they render noindex. The Authentication page stays listed and indexed.

Affects: API reference

Prompt summary: The author expects the /docs/api/**/servers pages to stay out of the sitemap, because an earlier PR was meant to exclude them, but they still show up. The fix keeps /authentication pages indexed, since those are real pages.

Why

The live sitemap-api.xml on www.elastic.co and on edge lists 9 /servers URLs, for example /docs/api/cloud-billing/servers. The Servers page exists only so old Bump.sh links land. #4979 first left hidden API pages out of the sitemap. A review comment pointed out that the page is hidden but still indexable, and the fix for it listed every API page whenever its tree is listed.

What

Servers leaves the sitemap

StructuralNavigationItem now reports InSitemap as false for the Servers page. The base InSitemap member is virtual again, so every other API page keeps its current behaviour. The Authentication page is listed even when the sidebar hides it.

Servers renders noindex

ApiPageTypes.Robots takes the page's own ExcludeFromIndexing, which is true for Servers. A page that is not in the sitemap now says noindex too, so the sitemap and the robots meta agree. A build that disallows indexing still wins and renders noindex, nofollow. The landing pages of hidden version trees stay index, follow.

Tests and docs

The sitemap test in AssemblerOpenApiBuildStepIntegrationTests now expects both servers URLs to be absent while the pages still render. A new generator test checks the rendered robots meta of Servers, an operation page and the landing pages. A table test pins that a hidden Authentication page stays listed and indexed. The sitemap section of api-explorer.md describes the new rule.

Verify

mise run test
# ApiPageTypeTests.StructuralPage_HiddenFromTheSidebar_OnlyServersLeavesTheSitemapAndTheIndex — Servers excluded, Authentication kept
# OpenApiGeneratorMultiVersionTests.Generate_ServersPage_StaysNoindexWhileTheOperationPageIsIndexed — rendered robots meta

After the next production deploy, the live sitemap should hold no servers URL:

curl -s https://www.elastic.co/docs/sitemap-api.xml | grep -c '/servers</loc>'
# 0 (9 today)

The Servers page exists only so old Bump.sh links land. PR #4979 listed it in `sitemap-api.xml` after a review comment, which put 9 `/servers` URLs in the live sitemap.

`StructuralNavigationItem` now reports `InSitemap` and `ExcludeFromIndexing` as false and true for Servers. The page renders `noindex`, so the sitemap and the robots meta agree. The Authentication page stays listed and indexed, even when the sidebar hides it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@reakaleek
reakaleek requested a review from a team as a code owner November 24, 2026 12:51
@reakaleek
reakaleek requested a review from akira28 November 24, 2026 12:51
@reakaleek reakaleek added the bug label Nov 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

reakaleek and others added 3 commits November 24, 2026 14:11
…by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…review by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@reakaleek
reakaleek merged commit c86619c into main Nov 24, 2026
44 checks passed
@reakaleek
reakaleek deleted the fix-sitemap-deleted-pages-a5863ed9 branch November 24, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants