How can I disable public access to the always-up-to-date branch url?

With git branch deployment, Vercel creates an always-up-to-date branch url in the form of <project-name>-git-<branch-name>-<scope-slug>.vercel.app

This url seems to be publicly accessible. In Deployment Protection settings, I can disable access to the unique deployment url, but I haven’t noticed a setting that will prevent public access of the branch url (while still permittting public access to my main domain).

Is this possible?

Hi,

Can you confirm if you are using Standard Protection ?

All preview autogenerated URL should already be protected under Vercel auth. Can you share a project name where youa re seeing the difference?

2 Likes

Hi, @compound-eye! Welcome to the Vercel Community :smile:

To make the URLs in the format <project-name>-git-<branch-name>-<scope-slug>.vercel.app private, you can use deployment protection. By default, these URLs are publicly accessible, but you can configure them to be private.

This can be done through the Vercel Dashboard or by using specific configuration settings in your project.

You can set up access control to ensure that only authorized users can view the deployment URLs. This might involve setting up password protection or using Vercel’s built-in authentication mechanisms.

1 Like

Thanks @swarnava and @pawlean.

I do have Standard Protection enabled. The protection works for the specific automated deployment link, but it doesn’t seem to apply to the branch link (which remains the same for all deployments on that branch).

Is there a method that’s available on the Hobby plan to configure these URLs to be private? Password protection requires Pro, and I haven’t found any other authentication method I can apply to the branch link.

@swarnava @pawlean any info this question?

Unfortunately Password protection is Pro only feature. You can try using middleware and deploy your own auth based restriction

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.