Skip to content

fix: allow crawlers to fetch the sitemap in robots.txt - #12

Merged
fabianzimber merged 2 commits into
mainfrom
fix/robots-allow-sitemap
Nov 27, 2026
Merged

fabianzimber merged 2 commits into
mainfrom
fix/robots-allow-sitemap

Conversation

@fabianzimber

@fabianzimber fabianzimber commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

What

robots.txt ends the User-agent: * group with Disallow: / and only allows a short list of paths. /sitemap.xml was not in that list, so the sitemap that robots.txt itself advertises was blocked. Googlebot reads robots.txt and then skips the sitemap. Search Console reports this as "Sitemap could not be read: General HTTP error".

This change adds Allow: /sitemap.xml and a unit test for it.

How to test

  • npm run check
  • After deploy, https://leaf.shiftbloom.studio/robots.txt contains Allow: /sitemap.xml. Then resubmit the sitemap in Search Console.

@sonarqubecloud

Copy link
Copy Markdown

@fabianzimber
fabianzimber merged commit b04ca1b into main Nov 27, 2026
7 checks passed
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