Fixes tagged Cloudflare Pages
5 fixes · back to all fixes
Search Console: "Page with redirect" on 106 pages that all return 200
An index-failure email listed 102 URLs as Page with redirect, and every one of them loaded fine in a browser. Astro's directory build format emits /about/ in the sitemap and rel=canonical, every internal href in the source said /about, and the host 308s between them. Googlebot only ever reached the site through a redirect.
6 min read →
Your _headers file serves 7 headers in production and 2 on a preview deployment
After adding a scoped Content-Security-Policy rule, the preview deployment served only two of seven headers. It looked exactly like a rejected _headers file. Deploying the unchanged original to a preview produced the identical result.
4 min read →
GET /_worker.js returns 200 and every route it declares 404s
A hand-written _worker.js deployed to Cloudflare Pages, the deployment reported success, the site worked, and the entire API was gone. The file had been uploaded as an asset instead of compiled as a worker, so Pages served the source code at its own path.
5 min read →
My Cloudflare Pages deploy returned success and served 500 on every route
A direct upload to Cloudflare Pages answered success: true, handed back a deployment URL, and every single path on it returned HTTP 500 - including the live domain, because a deploy with no branch named goes to production. The manifest is not the files. Here is the three-step upload that actually works.
4 min read →
Link preview blank? Open Graph tags set by JavaScript never reach the crawler
Social crawlers read the HTML bytes and do not run your JavaScript, so og:title and og:image written client-side never reach them, even while DevTools shows the right tags. Check with curl and a crawler user-agent, then inject the tags server-side, here with a Cloudflare Pages Function.
5 min read →