How to Secure Vercel
Step-by-step guide to securing your Vercel deployment and protecting your applications.
Vercel Security Context
Vercel provides enterprise-grade hosting with automatic HTTPS and DDoS protection. Key security areas include environment variables, preview deployment access, and serverless function security.
Security Checklist
Secure environment variables
CriticalStore secrets in Vercel environment variables, not in code. Use different values for preview vs production.
Protect preview deployments
CriticalEnable password protection or restrict preview deployments to team members only.
Configure authentication
CriticalSet up proper authentication for any protected routes or API endpoints.
Review serverless functions
Audit API routes and serverless functions for security vulnerabilities.
Enable Web Application Firewall
Use Vercel's WAF features if available on your plan.
Configure headers
Set security headers in vercel.json or next.config.js.
Review redirects and rewrites
Audit redirects for potential open redirect vulnerabilities.
Enable HTTPS
Vercel enables HTTPS by default - verify it's working correctly.
Configure rate limiting
Set up rate limiting on API routes to prevent abuse.
Review deployment logs
Monitor logs for suspicious activity.
Set up team permissions
Configure appropriate access levels for team members.
Enable audit logging
Track deployments and configuration changes.
Review edge functions
Audit Edge Functions for security issues.
Configure domain security
Set up DNSSEC and CAA records for custom domains.
Review third-party integrations
Audit integrations for security implications.
Enable DDoS protection
Verify DDoS protection is active.
Review caching configuration
Ensure sensitive data isn't cached inappropriately.
Configure CORS
Set appropriate CORS policies for API routes.
Run security scan
Use VibeEval to scan your deployed application.
Related Resources
Automate Your Security Checks
Let VibeEval scan your Vercel application for vulnerabilities.
Scan Your App