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

netlify.toml — first linesTOML
# 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

Size
482 B (482 bytes)
MIME type
application/toml
SHA-256
190303a2f855b6d4ab988a33d721a47c7da3547b4ef15bb3cfaf9d42b0cd8257
MD5
ef1ab27c755e7b5cab88e525062b5d82

Download from the command line

curl -L -o netlify.toml https://files.samplefiles.com/config/netlify-toml/netlify.toml

Or check the download in your browser with the checksum calculator.