Vercel vs Netlify for AI-built apps: deploy errors compared
Vercel and Netlify document the same two deploy failures differently: a refresh 404 on a single-page app, and env vars that never reached the browser.
Checked against vendor docs on October 14, 2026. No traffic or failure-rate numbers.
What we are not claiming
Neither Vercel nor Netlify publishes a "which host fails more for AI apps" number. This page does not compare uptime, price, or speed. It compares deploy errors their docs actually describe, which are the ones that show up when Lovable, Bolt, Cursor, or v0 output is pushed live.
Refresh works locally and 404s on the host
A Vite or other single-page app handles routes in the browser. The host, by default, looks for a real file.
Vercel says it resolves every URL as a file path and cannot tell that a project is a single-page app. The documented fix is a rewrite in vercel.json at the repo root:
{
"rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}
The file has to be committed. Vercel says a Framework Preset of "Other" can also stop a correct rewrite. This rewrite is for SPAs, not for Next.js, which already has file-based routes. More on Vercel's 404.
Netlify documents the same need as a 200 rewrite, which keeps the URL and serves index.html. Put this last in public/_redirects (so Vite copies it into the publish folder):
/* /index.html 200
Or the same rule in netlify.toml. Existing files still win unless you force the rule. More on Netlify's 404.
Env vars that exist in the dashboard and are still undefined
Both hosts keep .env off the server until you add the names in project settings. The framework then decides what the browser is allowed to see.
- Vite only exposes
VITE_names. See the prefix fix. - Next.js only exposes
NEXT_PUBLIC_names to the client bundle, and replaces otherprocess.envreads in client code with an empty string.
On either host, those public values are baked in at build time. Adding one in the dashboard does not change the current deployment. You redeploy.
Vercel can also fail the install with npm ERR! ERESOLVE before any of this runs. The install command is overridable in vercel.json. See that build error.
Functions and webhooks
Vercel documents Fluid compute durations: Hobby up to 300 seconds, Pro and Enterprise up to 800 seconds, or 1800 seconds in beta on supported Node.js, Bun, and Python runtimes. A function that runs past its maxDuration is killed. See the timeout fix. This page does not quote a Netlify function limit, because that would be a second vendor's number and it is not needed to compare the SPA and env-var failures above.
Stripe cannot add a custom header. If Vercel Deployment Protection is on, Vercel documents a x-vercel-protection-bypass query parameter for webhook URLs. Standard Protection still leaves a custom production domain public and protects *.vercel.app URLs. See webhooks that never arrive.
Clerk documents a separate Netlify issue: an Astro app on Netlify can infinite-redirect because of Netlify's caching, including previews that use Clerk development keys. See the Clerk loop.
Which host for an AI-built app?
Pick the host the project was already written for. Next.js app output matches the paths Vercel uses in its own examples. A Vite project with a _redirects file matches Netlify's documented SPA rule. Moving it is fine, as long as you add the rewrite and the env vars the other host did not copy for you. The docs don't say one of them breaks less.
Sources
- https://vercel.com/docs/project-configuration/vercel-json (opens in a new tab)
- https://vercel.com/kb/guide/why-is-my-deployed-project-giving-404 (opens in a new tab)
- https://docs.netlify.com/manage/routing/redirects/rewrites-proxies (opens in a new tab)
- https://vite.dev/guide/env-and-mode (opens in a new tab)
- https://nextjs.org/docs/app/getting-started/server-and-client-components (opens in a new tab)
- https://vercel.com/docs/functions/configuring-functions/duration (opens in a new tab)
- https://vercel.com/docs/deployment-protection (opens in a new tab)
- https://clerk.com/docs/guides/development/deployment/astro (opens in a new tab)
Can't fix it? Get help.
If the steps didn't clear the error, send what the screen says. A person can take a look. This is a request for a paid fix, not an instant chat.