netlify.toml Generator
Generate a netlify.toml with build command, redirects and security headers ready for your Netlify deploy. Set it up in the browser and copy the file.
netlify.toml with SPA fallback and headers
Every single-page app hits the same wall on Netlify: you open /dashboard straight from the address bar and get a 404, because that file does not exist on disk and the router resolves it in JavaScript. The fix is a rewrite to /index.html with status 200. This generator hands you a netlify.toml that already has the rule, plus a build command and three security headers.
The output is fixed: no fields to fill in, the TOML shows up as soon as the page loads, and the button reprints the same text. Notice the status 200 on that redirect instead of 301 or 302. With 200, Netlify serves index.html while the URL stays put in the address bar, which is precisely what a client-side router needs. Files that genuinely exist are still served before the rule applies.
Adjust publish before shipping: dist matches Vite and Astro, but Create React App emits build. If your repo already has a _redirects file in public, note that it is evaluated before the rules in netlify.toml, and keeping both invites confusion. On a site with server routes, the catch-all rewrite gets in the way more than it helps, so drop that block. Nothing leaves your browser while it generates.
Frequently asked questions
Can I change the publish folder in the tool?
Will the /* rewrite break my images and CSS?
Can I add a Content-Security-Policy?
Related Tools
railway.toml Generator
Generate a railway.toml with build, start and healthcheck settings ready for your Railway deploy. Configure it in the browser and drop it in your repo.
vercel.json Generator
Create a vercel.json with routes, redirects and HTTP headers ready for your Vercel deploy. Set it all up in the browser and drop it into your repo.
Cloudflare wrangler.toml Generator
Generates a wrangler.toml for Cloudflare Workers, with name, compatibility date, environment variables and a KV namespace. Routes are yours to add.