How to Block or Allow Email Domains with Domain Validation in Gravity Forms

Learn how to quickly block known spammer domains or restrict submissions to emails from specific domains. Bonus: top-level domain support.

Domain validation lets you control which email domains can be submitted to your forms. Block unwanted domains with a domain blocklist, or only allow specific ones through by conjuring an allowlist.

With GP Email Validator, you can create lists that target exact domains (like gravitywiz.com) and top-level domains (like .org) to cast your net as wide—or narrow—as you like.

Let’s take a look at how easy it is to set it up. 🧙‍♂️

If want to block specific emails or IP addresses, GP Blocklist is likely the spell for you. Check it out!

This article requires the Gravity Forms Email Validator perk.

Buy Gravity Perks to get this perk plus 48 other premium Gravity Forms plugins!

View Plugin Buy Now

Enable GP Email Validator

GP Email Validator is available through Gravity Perks and you can download it directly from your Spellbook. 📖

Set Up Domain Validation

Head over to your Gravity Forms settings and navigate to Email Validator.

Showing GP Email Validator's settings inside Gravity Forms' settings.

Curious about the specific Email Validator settings? You can read about it in more detail over at How to Enable Real-Time Email Validation in Gravity Forms.

Under the Domain Validator settings, choose the Domain Validator Mode. None indicates that Domain Validator is inactive.

Option 1: Create Allowlist

Select Allow to create an allowlist of domains and/or top-level domains. Only emails from those domains can be submitted.

Use Case Examples:

Restrict access to country-specific top level email domains for a training portal funded by a local government program. If international trainers or partner organizations need to register too, you can add their domains individually.

Allowing one top-level domain and two specific domains with GP Email Validator's "Allow" domain validator.

Only allow students from accredited universities and community colleges to get a student discount.

Allowing one top-level domain with GP Email Validator's "Allow" domain validator.

Option 2: Create Blocklist

Select Block to create a blocklist of domains and/or top-level domains. All other emails (that are also validated by Email Validator) can be submitted, except these ones.

Use Case Example:

Block specific domains and top-level domains that have given you trouble before.

Blocking one specific domain and one top-level domain with GP Email Validator's "Block" domain validator.

Pro-tip: Temporary email domains are automatically blocked by Email Validator’s default rules.

You’re all set!

After saving your settings, that is. 😉
Once GP Email Validator is active, the domain validation you set up is automatically applied to all Email fields across your forms. If you want to disable GP Email Validator on certain email fields:

  1. Navigate to the field.
  2. Open the Perks tab in their field settings.
  3. Unselect the Enable Email Validation checkbox.

Have questions? Hit us up in the comments. 👇

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.


Grab a bundle of free Gravity Forms plugins

Enter your email and receive our most popular free plugins and snippets, plus access to hundreds of others.

This field is for validation purposes and should be left unchanged.