Just received some rather angry emails from Google that URLs in my sitemap are returning 404s from Cloudflare Pages.
An example URL that is being returned as a 404 from Pages:
curl -I https://botblock.org/lists/bots.ondiscord.xyz HTTP/2 404
(Edit for clarification: This page will still work in a browser, as the 404 file in the project will handle doing client-side hydration (SPA-style) based on the current URL. However, this URL is being served from the 404 file rather than the correct pre-generated HTML file for the route, which can be seen if JS is disabled.)
I have run a build of the site locally, the exact same code as production, and have confirmed that the file for this page does exist:
npm run build ls dist/lists/bots.ondiscord.xyz.html dist/lists/bots.ondiscord.xyz.html
The docs state that a file at that location should be accessible at the URL above, so I’m rather confused why I’m getting back 404s?
Based on the docs, it is also expected that accessing the direct HTML file will redirect to the non-HTML URL, which does appear to happen, so it definitely feels like something is going wrong with the non-HTML → HTML resolution:
curl -I https://botblock.org/lists/bots.ondiscord.xyz.html HTTP/2 308 location: https://botblock.org/lists/bots.ondiscord.xyz
Would appreciate some help, as Google is rather unhappy about the situation.