Whenever a new deployment is created, Vercel will automatically generate a unique URL that is available publicly, or password protected. This URL is generated regardless of environment and looks like this:
Using this URL, you are forever able to access a particular deployment. It will never cease to exist and can therefore be used as part of a revision history.
- When you make a deployment using Vercel CLI, the generated URL is provided in the command line when the build has completed
- If your project is connected to a Git provider, the URL is returned by the Vercel bot as part of a Git comment inside the Git commit if the deployment is successful
- Under the Project's Overview and Deployments tabs as shown below
Generated URLs are comprised of several different pieces of data associated with the underlying deployment.
Varying combinations of the following information may be used to generate a URL:
<project-name>: The name of the Project that contains the deployment
<unique-hash>: 9 randomly generated numbers and letters
<scope-slug>: The slug (not the name) of the Personal Account or Team that contains the Project/Deployment
<branch-name>: The name of the Git branch for which the deployment was created
<author-name>: The username of the Personal Account belonging to the Team Member that created the deployment
To access the latest successful version of a deployment connected to a Git branch, you do not have to find the unique generated URL mentioned above. You can refresh the generated URL associated with the Git branch.
The structure of the URL will be as follows:
To access the unique generated URL of a successful deployment created by Vercel CLI, you can save the standard output of the deploy command. The generated URL associated with a CLI branch will have the following structure:
If the deployment is created on a Team, you can also use the URL specific to the deployment's author. It will have the following structure:
This allows you to easily stay on top of the latest change deployed by a particular Member of a Team within a specific Project.
If more than 63 characters are present before the
.vercel.app suffix (or the respective Preview Deployment Suffix) for a generated URL, they will be truncated.
For example, this is what an Automatic Branch URL could look like:
The truncation happens by taking away from the end of this list of characters until only 56 of them remain.
Afterward, the first 6-characters of an SHA-256 hash prefix, the Git branch, and the Project name preceded by a dash (like
-ar63fm) will be appended at the end to avoid collision with other generated URLs that may also be truncated.
The hash prefix will either be
git-fork- if the deployment was created through a fork. In the end, the hash creation might look like this:
const prefix = isFork ? 'git-fork-' : 'git-'; sha256(prefix + branch + projectName).slice(0, 6);
Once the truncation is complete, the list of characters will be exactly 63 and therefore comply with the limit.
<project-name> resembles a regular web domain, it may be shortened to avoid that resemblance. For example,
www-company-com would be changed to just
company. This is done to prevent an accidental trigger of anti-phishing protection built into web browsers that protect the user from visiting domains that look roughly like other domains they visit.
Lastly, suppose a Preview Deployment Suffix is configured, and the entire generated URL exceeds 253 characters. In that case, the same truncation as mentioned above applies. Still, instead of 63 characters, the length limit will be 253 minus the length of the Preview Deployment Suffix plus 1 (for the period that precedes the Preview Deployment Suffix).
For example, if the domain
acme-previews.com is configured as the Preview Deployment Suffix. In that case, that domain has a length of 17, including the preceding
., the character limit that would apply before the suffix is 18.
To customize the appearance of any of the generated URLs mentioned above, you can enable the Preview Deployment Suffix feature available in the General section of the Team Settings, provided that you have the right permission.
Normally, every generated URL ends in
vercel.app. With the feature shown below, you can replace this suffix with any Custom Domain of your choice:
The entered custom domain must be:
- Available and active within the team that enabled the Preview Deployment Suffix
- Using Vercel's Nameservers
Ensure that your team is on the Pro or Enterprise plan to enable this feature. Type the custom domain of your choice in the input, and click Save. The next deployment will use the new Preview Deployment Suffix.
To disable the feature, clear the input, then click Save. The next Preview Deployment will revert back to the default
You may encounter this error if you are using the Preview Deployment Suffix in your team. Make sure that the custom domain you configured is:
- Active (not deleted)
- Available within the team that enabled the Preview Deployment Suffix
- Backed by an active wildcard certificate
The best way to satisfy all of these constraints is to ensure the domain is also added to a project located in the same team. In this project, you can include a single
index.html that displays when someone visits the root of the domain.