Protect Vercel deployments

What is the name of the domain?

redacted.vercel.app

What is the issue you’re encountering

Is there a way to protect Vercel deployments with Cloudflare Access? The ones generated on their .vercel.app subdomain. My custom domain gets tagged to the latest deployment, but there are also various preview links offered by them that I’d like to protect.

Vercel authentication on Standard protection helps to an extent:

Protects all preview URLs and production deployment URLs. All up to date production URLs are unprotected.

I am trying to cover the up-to-date production URLs as well.

Due to .vercel.app being outside of my control, Cloudflare Access won’t be of help here I guess, but wanted to confirm nonetheless.

Is the DNS record pointed to the vercel DNS via CNAME and proxied :orange: as below for your zone? :thinking:

I used sub-domain vercel.mydomain.com:

slika

If yes, then Access will work.

Otherwise, I cannot answer more since I haven’t used it so much and might have to test out before.

Sorry if it wasn’t very clear from my original post, but I am not talking about a custom domain that I control. I do have a custom domain set up, and that’s already Access-protected.

Vercel also deploys the site to their own domain: .vercel.app. That’s the one I am hoping I could Access-protect too.

Mostly certain there isn’t a way, and this post is mostly a feedback for the Access team so that they can work a partnership of sorts with Vercel. It’d be useful to many mutual customers.

I decided to add auth to the application for now, instead of depending only on Access.

Would a CNAME entry in your cloudflare and domain that you do control with redirect to the temporary x.vercel.app url provide some level of desired protection? (E.g. staging.yourdomain.com → xxxx.vercel.app)

That is not possible without Vercel Pro or Vercel Enterprise plans unfortunately:

Maybe I should just host the NextJS application on Cloudflare Pages so that I can easily use Cloudflare Access.

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