Firebase Hosting Headers: Cache, Security, CORS Config
The headers block in firebase.json controls cache TTL, security policy, and CORS. Copy the minimum config that ships fast and safe, and skip the patterns that silently break your whole site.
Firebase Hosting deploy, custom domains, caching, and go-live checklists.
Firebase Hosting`s free tier is friendly to indie content sites and deployment is simpler than people think. This hub covers deploy, custom domain binding, cache behavior, and when Firebase Hosting is not the right choice.
The headers block in firebase.json controls cache TTL, security policy, and CORS. Copy the minimum config that ships fast and safe, and skip the patterns that silently break your whole site.
Ship a static site (Astro, Vite, Hugo, plain HTML) to Firebase Hosting in about 10 minutes — free SSL, custom domain, cache headers, and the macOS port-5000 fix. Verified June 2026.
Deployed but visitors still see the old page? Fix it with this firebase.json cache-header config, a curl diagnostic, and the correct rollback command (verified June 2026).
Point your domain at Firebase Hosting with the exact TXT, A and AAAA records, dig verification commands, and fixes for the Needs setup loop and stuck SSL.
Firebase's Spark free tier gives 10 GB storage + 10 GB/month transfer (a 360 MB/day soft cap). Use this page-weight math, real Blaze rates, and budget config to know if you fit.
A reproducible 10-step pre-launch checklist for Firebase Hosting (June 2026): firebase.json, custom-domain DNS, SSL timing, cache headers, redirects, sitemap, and a rehearsed rollback.
Firebase Hosting rewrites map URLs to a Cloud Function, Cloud Run, or a single-page app. The three patterns that actually work as of June 2026, the modern functionId syntax, and the traps each one hides.
Pages work locally but 404 on Firebase Hosting. Diagnose it in ten minutes with the exact request priority order, firebase.json snippets, and curl commands that pinpoint the cause.
Firebase Hosting is Google's static + edge CDN. Here is when it fits vs the newer App Hosting, the free-tier limits, a baseline firebase.json, and deploy commands.
Firebase Hosting vs Vercel, compared on free-tier limits, pricing, serverless, and one rule most guides skip: Vercel's free Hobby plan bans commercial use. Verified June 2026 figures.