Skip to content
How-to
2 min read

Firewall rules

Learn how Enterprise teams can customize their Vercel Firewall rules by restricting access to certain IP addresses.
Table of Contents
Choose a framework to optimize documentation to:

    Creating custom rules are available on Enterprise plans

    Those with the owner and member roles can access this feature

    With Vercel Firewall, you can create rules to provide more control over your site, such as blocking IP addresses from accessing your site

    You can create custom rules to block specific IP addresses, effectively preventing unauthorized access or unwanted traffic. This security measure allows you to restrict access to your applications or websites based on the IP addresses of incoming requests.

    Common use cases for IP blocking on Vercel include:

    • Blocking known malicious IP addresses
    • Preventing competitors or scrapers from accessing your content
    Note that this feature only blocks individual IP addresses and not Classless Inter-Domain Routing (CIDR) ranges.

    In cases such as blocking based on complying with specific laws and regulations or to restrict access to or from a particular geographic area, we recommend using Middleware.

    To block an IP address, you can create a custom rule in your dashboard:

    1. On your Team's dashboard, navigate to Settings and select the Security tab
    2. On the IP Blocking section, click Create New Rule to create a new rule set
    3. Add the IP address you want to block and the host you want to block it from. The host is the domain name of the site you want to block the IP address from accessing. This value can be copied from the URL of the site you want to block, without the https or www prefix. For example my-site.com

    You can also add subdomains to the host field, such as blog.my-site.com

    Creating a new IP blocking rule.
    Creating a new IP blocking rule.

    Custom firewall rules for IP blocking is limited to 1000 rules.

    Note: If you need Firewall configurations, such as IP blocking, contact us to discuss Enterprise.

    Contact Sales
    Last updated on December 1, 2023