TL;DR
This 15-item checklist covers critical Vercel security configurations: environment variables, security headers, access control, and API route protection. 5 critical items must be fixed before launch, 6 important items within the first week, and 4 recommended items when you can.
Quick Checklist (5 Critical Items)
Environment Variables 4
Security Headers 4
Access Control 4
API Routes 3
Vercel Security Best Practices
Vercel handles infrastructure security, SSL certificates, and DDoS protection automatically. Your responsibility is configuring environment variables correctly, adding security headers, and securing your application code.
The most common mistake is using the NEXT_PUBLIC_ prefix on secrets that should be server-only. Variables with this prefix are bundled into your JavaScript and visible to anyone viewing your site source.
How do I add security headers on Vercel?
Add security headers in vercel.json using the headers property, or in next.config.js for Next.js apps using the headers function. Include headers like X-Frame-Options, X-Content-Type-Options, Content-Security-Policy, and Strict-Transport-Security.
Are Vercel environment variables secure?
Yes, Vercel encrypts environment variables at rest. Variables without the NEXT_PUBLIC_ prefix are only available server-side. Ensure you use the correct prefix to avoid exposing secrets to the browser. Also set environment-specific values for Production vs Preview.
Should I protect preview deployments?
Yes, if your previews contain sensitive data or functionality. Enable Vercel Authentication for your project, or use password protection. Preview URLs are semi-random but can be discovered or shared accidentally.
Check Your Vercel Deployment
Our scanner reviews headers, exposed secrets, and common misconfigurations.
Start Free Scan