Three Silent Cloudflare Pages Defaults That Can Break a Static Site at Launch
A developer deploying a static Astro site to Cloudflare Pages discovered three platform defaults that caused issues without throwing any errors. Cloudflare's 'Managed robots.txt' feature, enabled by default for new zones, injected AI crawler-blocking rules that overrode the site's custom robots.txt file. Cloudflare Pages also appended trailing slashes to URLs, conflicting with the site's canonical links and causing 308 redirects on every indexed page. A separate path-normalisation mismatch caused 11 noindex pages to silently reappear in the sitemap, while the 'Always Use HTTPS' redirect was also off by default, risking duplicate indexing of HTTP and HTTPS versions. The developer's key takeaway is that local and build-directory checks cannot catch host-level behaviour — post-deployment checks against the live origin are essential.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in