Version skew occurs when different versions of your application run on client and server, causing application errors and other unexpected behavior. For example, imagine your newest deployment modifies the data structure by adding a required field to a user's profile. Older clients wouldn't expect this new field, leading to errors when they submit it.
Vercel's Skew Protection resolves this problem at the platform and framework layer by using version locking, which ensures client and server use the exact same version. In our example, outdated clients continue to communicate with servers that understand the old data structure, while updated clients use the most recent deployment.
By implementing Skew Protection, you can reduce user-facing errors during new rollouts and boost developer productivity, minimizing concerns about API compatibility across versions.
Other frameworks can implement Skew Protection by checking if VERCEL_SKEW_PROTECTION_ENABLED has value 1
and then appending the value of VERCEL_DEPLOYMENT_ID to each request using one of the following options.
If you're building outside of Vercel and then deploying using the vercel deploy --prebuilt command, Skew Protection will not be enabled because the
Deployment ID was not known at build time. For more information, see When not
to use --prebuilt.
If you are using Next.js 14.1.4 or newer, there is no additional configuration needed to enable Skew Protection.
Older versions of Next.js require additional next.config.js configuration.
View config for 13.4.7 to 14.1.3
next.config.js
/** @type{import('next').NextConfig} */constnextConfig= { experimental: { useDeploymentId:true,// Optionally, use with Server Actions useDeploymentIdServerActions:true, },};module.exports= nextConfig;
The useDeploymentId configuration enables Skew Protection for all framework-managed static file requests from your Next.js app such as for JavaScript and CSS files. You can also opt-into Skew Protection for Next.js Server Actions with useDeploymentIdServerActions.
Skew Protection is only available for Pro and Enterprise, not for Hobby teams. Pro teams have a maximum age of 12 hours and Enterprise teams can configure a custom maximum age.
Vercel automatically adjusts the maximum age to 60 days for requests from Googlebot and Bingbot in order to handle any delay between document crawl and render.
Deployments that have been deleted either manually or automatically using a retention policy will not be accessible through Skew Protection.