Skip to content

Deploy your Astro Site to Vercel

How to deploy your Astro site to the web on Vercel.

You can use Vercel to deploy an Astro site to their global edge network with zero configuration.

This guide includes instructions for deploying to Vercel through the website UI or Vercel’s CLI.

Your Astro project can be deployed to Vercel as a static site, or a server-rendered site.

Your Astro project is a static site by default. You don’t need any extra configuration to deploy a static Astro site to Vercel.

Add the Vercel adapter to enable on-demand rendering in your Astro project with the following astro add command. This will install the adapter and make the appropriate changes to your astro.config.mjs file in one step.

You can deploy to Vercel through the website UI or using Vercel’s CLI (command line interface). The process is the same for both static and on-demand rendered Astro sites.

After your project has been imported and deployed, all subsequent pushes to branches will generate Preview Deployments, and all changes made to the Production Branch (commonly “main”) will result in a Production Deployment.

You can use vercel.json to override the default behavior of Vercel and to configure additional settings. For example, you may wish to attach headers to HTTP responses from your Deployments.