Skip to content

How do I rollback Production without rebuilding?

You can instantly rollback to a previous Production Deployment without rebuilding the previous Deployment using the Vercel CLI.

Rollback with the CLI

  1. Install the Vercel CLI, log in to your Vercel account, and select the correct scope using the vercel switch command.
  2. In your project's Deployments tab, find the previous Production Deployment you wish to rollback to. To easily find this Deployment, you may want to filter for your Production Branch (e.g. main).

A previous Production Deployment URL.

  1. Verify that the previous Production Deployment you will rollback to works as expected.
  2. Execute the following vercel alias command:
$ vercel alias set [deployment-url] [custom-domain]

Assigning the custom domain to another Deployment using the Vercel CLI.

Note:

Make sure to use the Automatic URL for the [deployment-url] parameter (e.g. [<project-name>-<unique-hash>-<scope-slug>.vercel.app]).

Make sure to not include the HTTP protocol (e.g. https://) for the [custom-domain] parameter.

vercel alias set hotdog-8jk8-coolcat.vercel.app sillyhotdog.im

vercel alias set hotdog-8jk8-coolcat.vercel.app https://sillyhotdog.im

This Vercel CLI command will need to be performed manually for each custom domain in your Production Deployment that needs to rollback to a previous Production Deployment.

Couldn't find the guide you need?