Skip to main content

Vercel Config Generator

Build a complete vercel.json visually. Select your framework, configure URL rewrites and custom headers, pick deployment regions, and tune function timeouts — then copy the ready-to-use JSON.

✓ Next.js / Astro / Vite / SvelteKit / Remix ✓ URL rewrites & response headers ✓ Multi-region deployment ✓ Function maxDuration & memory

Frequently Asked Questions

What is vercel.json and when do I need it?▼

vercel.json is Vercel's project configuration file. You need it when you want to customize build behavior beyond Vercel's auto-detection — for example, adding URL rewrites (to proxy API requests), custom response headers (for security or caching), function timeouts, or region configuration. For simple projects, Vercel auto-detects your framework and you may not need it at all.

What's the difference between rewrites and redirects in Vercel?▼

Rewrites forward requests to a new destination transparently — the user's browser URL doesn't change. Redirects send the browser to a new URL (301/302 responses). Use rewrites to proxy API calls to a backend (e.g. /api/:path* → https://api.example.com/:path*) to avoid CORS issues. Use redirects for SEO-friendly URL restructuring where the URL should visibly change.

How do I choose between Vercel deployment regions?▼

Choose regions closest to your users or backend services. iad1 (US East, Virginia) is Vercel's default and primary region. sfo1 (US West) is good for West Coast or Asia-Pacific traffic. lhr1 (London) and cdg1 (Paris) serve European users. sin1 (Singapore) and hnd1 (Tokyo) serve Southeast Asia and Japan. For global apps, deploying to multiple regions reduces latency but increases cost.

What does maxDuration do for Vercel Functions?▼

maxDuration sets the maximum execution time (in seconds) for a serverless function before Vercel terminates it. The Hobby plan allows up to 10s, Pro up to 300s. For API routes that call slow external services or run heavy computations (like AI inference), increasing maxDuration prevents timeout errors. Default is 10s on Hobby and 15s on Pro.

How do I add security headers with vercel.json?▼

Use the headers field to add HTTP response headers to all or specific routes. Common security headers: X-Content-Type-Options: nosniff (prevents MIME sniffing), X-Frame-Options: DENY (prevents clickjacking), Strict-Transport-Security (forces HTTPS), Content-Security-Policy (prevents XSS). Apply them to /(.*) to cover all routes. These headers are injected at the CDN edge, so there's no performance cost.

Can I use vercel.json with Next.js rewrites configured in next.config.js?▼

Yes, but they work at different layers. next.config.js rewrites run inside the Next.js server and can access middleware/auth context. vercel.json rewrites run at the CDN/edge before hitting Next.js — useful for routing to external services. If both are set, vercel.json takes precedence for requests it matches. Avoid duplicating the same rules in both files to prevent confusion.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →