Skip to content
6 min read

When you create a new deployment in either a preview or production environment, Vercel will automatically generate a unique URL in order for you to access the deployment. This URL is publicly accessible by default, but you can configure it to be private using deployment protection. The URL is structured as so:

url-structure
<project-name>-<unique-hash>-<scope-slug>.vercel.app

You can use this URL to access a particular deployment forever. It will never cease to exist and can therefore be used as part of a revision history.

You can access these automatically generated URLs in the following ways:

  • On the command line when the build has completed.
  • When using Git, you have two options to access deployment URLs. Firstly, you can access the generated URL for a specific deployment within your pull request. Alternatively, you can view a URL that displays the latest build. This URL is returned by the Vercel bot as part of a Git comment inside the Git commit, but only if the deployment is successful.
  • Under the Project's Overview and Deployments tabs as shown below
Generated URL for a production deployment.
Generated URL for a production deployment.
Generated URL for a production deployment.

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:

url-structure
<project-name>-git-<branch-name>-<scope-slug>.vercel.app

To access the URL for a successful deployment from Vercel CLI, you can save the standard output of the deploy command. The generated URL will have the following structure:

url-structure
<project-name>-<scope-slug>.vercel.app;
Once you deploy to the production environment, the above URL will point to the production deployment.

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:

url-structure
<project-name>-<author-name>-<scope-slug>.vercel.app;

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:

automatic-branch-url
my-project-git-this-is-really-an-extremely-long-bra-abc123xyz-scope-slug.vercel.app;

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-, or git-fork- if the deployment was created through a fork. In the end, the hash creation might look like this:

hash-creation
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.

If your <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:

Selecting a custom value for the Preview Deployment Suffix.
Selecting a custom value for the Preview Deployment Suffix.
Selecting a custom value for the Preview Deployment Suffix.

The entered custom domain must be:

  • Available and active within the team that enabled the Preview Deployment Suffix
  • Using Vercel's Nameservers
If you are unable to use Vercel's Nameservers, follow this guide as a workaround.

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.

Hobby
Pro
Enterprise
Not available
$100/month
Custom

To disable the feature, clear the input, then click Save. The next Preview Deployment will revert back to the default vercel.app suffix.

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:

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.

Last updated on February 23, 2023