Skip to content
Docs

How can I use Vercel with GitHub IP restrictions?

This guide will describe how you can use Vercel even when you have an IP allowlist configured in GitHub.

Tilly Gee

Copy link to headingWhat is the constraint?

When you have an IP allowlist enabled on GitHub, you need to configure which IPs can access your resources in your GitHub account. Because the Vercel GitHub integration uses the API to access your git repos, it means that the restriction will apply to things such as project creation, repository linking and accessing your source code during the build step. By default, Vercel's infrastructure uses a dynamic range of IP addresses for outbound requests, which can make allowlisting a challenge.

Copy link to headingCan I still use Vercel whilst keeping IP restrictions enabled?

Yes! You can still use Vercel with this feature enabled by deploying as part of your GitHub actions or just using the Vercel CLI directly.

When using GitHub actions, you will need to deploy your project with vercel build and then vercel deploy --prebuilt. This allows you to build your project without exposing your source code to Vercel. This skips the build step on Vercel and uploads the previously generated .vercel/output folder to Vercel, meaning Vercel does not need to access the GitHub API, so you don’t need to allow any Vercel IPs.

Learn more about how to configure GitHub Actions and Vercel for custom CI/CD workflows.

Copy link to headingEnterprise Customers

If you have an Enterprise team on Vercel, please reach out to your Vercel representative directly, who can discuss custom options to set this up using the GitHub integration.

Related documentation

More Git Integration guides