Config Files · 1 file
Sample netlify.toml File
netlify.toml configures Netlify builds, redirects and headers. Our sample is realistic and valid for its tool, with fake hosts and secrets.
netlify.toml · 482 B
netlify.toml
A Netlify config with build settings, a context override, redirects with a SPA fallback and security headers. All hosts, keys and secrets are fake.
CC0 · free for any use · Verified by an independent tool · Report a problem
# Sample netlify.toml — samplefiles.com
[build]
command = "npm run build"
publish = "dist"
[build.environment]
NODE_VERSION = "22"
[context.deploy-preview]
command = "npm run build -- --mode preview"
[[redirects]]
from = "/old-blog/*"
to = "/blog/:splat"
status = 301
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"File details
Download from the command line
curl -L -o netlify.toml https://files.samplefiles.com/config/netlify-toml/netlify.tomlwget https://files.samplefiles.com/config/netlify-toml/netlify.tomlhttps://files.samplefiles.com/config/netlify-toml/netlify.tomlprintf '%s %s\n' 190303a2f855b6d4ab988a33d721a47c7da3547b4ef15bb3cfaf9d42b0cd8257 netlify.toml | shasum -a 256 -cOr check the download in your browser with the checksum calculator.