Platform
Netlify fixes
Choose a Netlify error, check its source, and follow the relevant walkthrough.
Start with four Netlify checks
Choose a starting point from routing, environment variables, function limits and secret scanning. Write down whether the failure happens during deployment, when opening a URL, or after pressing a button. Use that distinction to choose the next check. If you are still deciding where to host the project, read Vercel vs Netlify; for a broken deployment, keep the current host while gathering evidence.
1. SPA redirects and the published files
Netlify accepts redirect and rewrite rules in a _redirects file in the publish directory or in netlify.toml. Netlify redirect configuration. If your first page opens but a nested URL fails on refresh, compare both URLs and inspect the actual published output. Look for your routing file there, not just in the source tree. Review the framework's intended routing before adding a catch-all, and test an asset URL as well as an application route after your change. Keep a copy of the previous configuration so you can undo an overly broad rule.
2. Build variables versus function variables
Netlify environment variables have scopes and contextual values, including separate values for production and Deploy Previews. Netlify environment variables. Make a small inventory of variable names, the code that reads them, and the deploy context you are testing. Check the build scope for build-time configuration and the Functions scope for server-side handlers. Do not paste secret values into a ticket or a screenshot. When comparing preview with production, compare the selected context and variable names first; then redeploy and repeat the same failing action.
3. Function duration and payload size
Netlify documents separate execution limits for synchronous, scheduled and background functions, plus request and response size limits. Netlify function configuration and limits. Measure the request that fails: note its duration, approximate upload size, function name and response code. Try a smaller input as a controlled comparison. For a long-running task, review the appropriate function type before raising an unrelated setting. Keep payload-size investigations separate from bundle-size or dependency investigations; record which limit the error actually names, rather than treating every function failure as a timeout.
4. Secret scanning
Netlify's smart detection scans repository code and build output for potential secrets and fails a build when it detects one, identifying the location in the deploy log. Netlify secret scanning. Inspect the reported file before deciding what to remove. If it contains a credential, follow that provider's rotation procedure and move the replacement into the appropriate server-side configuration. For an apparent false positive, verify what the value is before considering a narrow exception. Avoid turning off the whole scan just to obtain a successful deploy.
How to read a Netlify deploy log
Each Netlify deploy has a detail page with a deploy log, including build output and deployment status. Netlify deploy-log documentation. Use this sequence to turn that output into a specific next action:
- Select the exact attempt. Open the deploy associated with the URL you tested. Record its branch, commit and time in your notes. Avoid mixing a failed preview build with an older working production deployment.
- Find the failing stage. Read upward from the final failure message until you reach the command or operation that failed. Mark whether you were installing dependencies, building the app, packaging a function or scanning output.
- Read the nearby context. Save the first useful error and a few surrounding lines. Include the named file, dependency or configuration key. Leave credentials and customer data out of the excerpt.
- Compare settings with the project. Check the build command, output folder and runtime choices against the repository you intended to deploy. Confirm that you are examining the correct project before editing its settings.
- Make one targeted change. Follow the relevant fix below, then start a new deploy. Write down the change next to the original error so you can compare the two attempts without relying on memory.
- Test the published behavior. Open the new URL directly, refresh the failing route, and repeat the action that originally broke. Keep the previous deployment reference until those checks are complete; use it when planning a rollback.
Last edited
40 fixes: 12 in full, then 28 more by title.
Top Netlify fixes
- Clerk sign-in keeps redirecting in a loop
Use a small test case to compare the behavior before and after your repair.
- Bolt custom domain will not connect
Review the proposed configuration change, deploy it deliberately, and check the affected route again.
More Netlify fixes
Older or narrower fixes for Netlify. Titles only.
- Stripe success page 404 on Netlify
- Bolt preview works, the Netlify site does not
- Stripe webhook failing: 404, 307/308 redirect, timeout or 500
- Stripe paid, but the user was not upgraded
- Clerk: auth() was called but clerkMiddleware() was not detected
- Clerk production deploy is still using pk_test_ keys
- Prisma: prepared statement "s0" already exists
- Firebase auth/operation-not-allowed
- Firebase auth/invalid-credential
- Lovable app is a blank white or black screen after publish
- Bolt publish failed or the live site will not open
- Lovable export code won't run locally or on another host
- Vite env var is undefined because the name has no VITE_ prefix
- Firebase signInWithRedirect fails on the deployed domain
- Vibe-coded site not indexed by Google: how to fix it
- Invalid JWT after switching to sb_publishable or sb_secret keys
- TypeError: Failed to fetch (only in production)
- Stripe secret key (sk_live_, sk_test_, or rk_) is in the front-end code
- AWS access key (AKIA) is in the front-end code
- Firebase auth/unauthorized-domain after deploy
- Stripe secret_key_required: a publishable key called a secret API
- Stripe customer portal session will not open
- Stripe api_key_expired: The API key provided has expired
- Content Security Policy (CSP) header not set, or missing CSP directives
- X-Frame-Options header not set
- X-Content-Type-Options header missing
- CORS: Content-Type application/json is not safelisted and triggers a preflight
- Blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present