What this thread does
Do first: inspect the deployed publish directory for index.html, then add /* /index.html 200 as the last fallback rule in _redirects or its equivalent in netlify.toml.
Short answer
As of November 2026, use Netlify's current routing documentation. A direct SPA route needs the entry document returned with status 200 while preserving the requested URL. A 301 is a permanent redirect; the browser address bar displays the new address (status semantics).
Choose / don't choose
- 200 rewrite: choose for client-side routes handled by the SPA; don't use it to mask an API endpoint's legitimate error.
- 301 redirect: choose for an actual permanent URL move; don't redirect every deep link to the entry document (options).
- Unforced fallback: choose so deployed files win; don't force every asset path to return HTML.
Not for: Netlify environment-variable scopes; see env-var-missing-after-deploy-on-netlify-or-render-scopes-contexts-redeploy.
Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
SPA _redirects rule | /* /index.html 200; place the catch-all last | Netlify current docs, November 2026 | routing syntax, SPA rule |
_redirects destination | /index.html; document must exist at the publish root | Same catch-all | SPA rule |
status | 200 for rewrite; default redirect is 301, so specify it | Same catch-all | status codes |
force | false or omit; do not append ! to 200 in _redirects | Existing assets should win | shadowing/force, TOML example |
_redirects | File without extension in the final publish directory | Netlify file-based rules | location |
Equivalent TOML fallback, after more specific rules:
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
force = false
Order of operations
1. Inspect the deployed output, not just the source tree: confirm index.html, built assets and _redirects are present in the configured publish directory. Ensure the build copies any source public folder contents into that output (404 guide). 2. Order explicit URL moves and API proxies before the SPA catch-all. Specific rules precede general rules; the first matching rule wins. An explicit rule inside an API path must precede the general API proxy too (processing order). 3. Inspect both rule locations: rules in _redirects are processed before rules in the Netlify configuration file, so a file-based catch-all can swallow TOML rules regardless of their TOML order (precedence). 4. After deployment, directly open a deep route and refresh it; it should return the entry document with the original URL intact. Request a real JavaScript asset and an API route too: neither should return the SPA HTML. Fix incorrect asset URLs before considering force (routing, options).
Known failures and fixes
| Error (short quote) | Cause | Fix | Source |
|---|---|---|---|
404 | The report says refreshing a page besides the home page rendered the default Netlify 404 | Put the fallback in deployed output and ensure the destination exists | reported deep link, current 404 guide |
Page not found | The most common cause is a missing file | Inspect actual output and build settings, then correct the publish directory and rule location | official diagnostic |
Missing
- Framework adapter, build command and output directory are unspecified; do not assume a source folder is the deployed publish root.
- A universal SPA fallback returns HTML for unknown client paths too; the SPA must render its own not-found view.
Checked
2026-11-12; Netlify current routing/options/404 guides, routing guide dated July 14, 2025, and Jenna's September 23, 2019 report read. No deployment or route requests executed.
Started from a post by @Netlify, packaged by the editor. Original post