Skip to content

fix: 404 on /sitemap.xml#24

Merged
enricopiovesan merged 1 commit into
mainfrom
fix/sitemap-xml-404
Jul 11, 2026
Merged

fix: 404 on /sitemap.xml#24
enricopiovesan merged 1 commit into
mainfrom
fix/sitemap-xml-404

Conversation

@enricopiovesan

Copy link
Copy Markdown
Collaborator

Summary

  • /sitemap.xml 404'd — @astrojs/sitemap only emits sitemap-index.xml + sitemap-0.xml, and robots.txt correctly points at the working sitemap-index.xml, but the conventional default path many tools check without reading robots.txt first was missing.
  • Added a static public/sitemap.xml pointing at the same real sub-sitemap, so both paths resolve to the same content.

Test plan

  • Build output: dist/sitemap.xml content matches dist/sitemap-index.xml
  • curl 200 on both /sitemap.xml and /sitemap-index.xml after deploy

🤖 Generated with Claude Code

robots.txt correctly pointed at /sitemap-index.xml (the file
@astrojs/sitemap actually generates), but /sitemap.xml -- the
conventional default path crawlers and tools check without reading
robots.txt first -- 404'd. Added a static sitemap.xml pointing at the
same real sub-sitemap (sitemap-0.xml) so both paths resolve.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@enricopiovesan enricopiovesan merged commit b20d3c7 into main Jul 11, 2026
2 checks passed
@enricopiovesan enricopiovesan deleted the fix/sitemap-xml-404 branch July 11, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant