Vercel Env Vars Broke My Preview Deploy (And the 3 Fixes That Actually Worked)
Real debugging story: Next.js 15 app worked locally, preview returned 500, production was fine. The env var scoping mistakes Vercel docs don't emphasize.
Vercel, Cloudflare Pages, Netlify, GitHub Pages — bandwidth limits, SSL, cache, redirects.
Real debugging story: Next.js 15 app worked locally, preview returned 500, production was fine. The env var scoping mistakes Vercel docs don't emphasize.
Connected Cloudflare domain to free Pages hosting. DNS-only setup, www redirect, and avoiding registrar upsells.
AdSense on Hugo/Vercel — uBlock hid more than ads. Filenames, third-party domains, and lazy-load patterns that look like malware.
Same Hugo blog on three platforms. Compare build time, bandwidth, SSL, redirects — and which host I pick for ad-monetized blogs.
Deployed new Tailwind build, site looked broken. Netlify CDN cache, browser cache, and atomic deploy rollback explained.
SPA or VitePress at username.github.io/repo/ — assets 404, client routing broken. Set base path and fix GitHub Actions deploy.
Astro PUBLIC_ vars work in dev but undefined during CF Pages build. Set production vs preview env and avoid wrangler.toml pitfalls.
Performance audit on image-heavy tutorial blog. Lazy loading, responsive srcset, and moving off unoptimized PNGs cut LCP 74%.
WordPress migration broke old URLs. vercel.json regex redirects preserved 94% of inbound links per Google Search Console.
Lighthouse wanted longer cache TTL. vercel.json headers cut repeat-load time 60% and fixed stale HTML after deploys.
Custom domain shows valid DNS but SSL never issues on Vercel. Fix CAA records, Cloudflare proxy, and apex ALIAS configuration.
Static site builds locally but fails on Vercel. Fix Node version mismatch, missing build env vars, and wrong output directory with one vercel.json.
Static blog hit 180GB in 3 days on Vercel Hobby. Real bandwidth math, what triggers overages, and CDN fixes that kept the site online.