Skip to content

CRO / Conversion3 min read

How to Reject Unprofessional Emails in a Webflow Form

Learn how to block consumer email addresses like Gmail and Hotmail in a Webflow B2B form with JavaScript.

In this tutorial, Sandro, cofounder of the Gemeos Webflow agency, shows you how to block consumer email addresses (Gmail, Hotmail, Yahoo...) in a Webflow B2B form.

Example

Test with gmail.com, outlook.com... or a business address

Please use your business email.

✓ Business email accepted!

ApproachMethodReliability
Domain blacklistClient-side JS checkGood for obvious cases
Verification APIEmailhunter, ZerobounceVery high, paid
Business regex validationPattern based on the domainBasic

The script

Add this script to the body of your page. It intercepts the submission and shows an error message if the email comes from a consumer domain.

var BLOCKED = ['gmail.com', 'hotmail.com', 'hotmail.fr', 'outlook.com', 'yahoo.com',
  'yahoo.fr', 'wanadoo.fr', 'orange.fr', 'free.fr', 'laposte.net',
  'icloud.com', 'me.com', 'live.com', 'sfr.fr'];

document.querySelectorAll('form').forEach(function(form) {
  form.addEventListener('submit', function(e) {
    var emailInput = form.querySelector('input[type="email"]');
    if (!emailInput) return;
    var domain = emailInput.value.split('@')[1]?.toLowerCase();
    if (BLOCKED.includes(domain)) {
      e.preventDefault();
      emailInput.setCustomValidity('Please use your business email.');
      emailInput.reportValidity();
    } else {
      emailInput.setCustomValidity('');
    }
  });
});

Customize the blacklist

Add or remove domains from the BLOCKED array depending on your industry. Some companies allow Gmail Workspace (a business email on a custom domain): make sure you don't block real business emails that use Gmail in the backend.

Conclusion

This snippet cuts down on noise in your CRM and improves the quality of your B2B leads. See also: Webflow anti-spam honeypot.

Published on May 19, 2026

Sandro DA SILVA

Growth Marketer, Webflow expert, and jack-of-all-trades. Sandro handles commercial operations, ensures projects run smoothly, and addresses marketing-related issues (SEO, Tracking, Copywriting, etc).

You might be interested in these tutorials

Related tutorials

See all

You're going to working with us, guaranteed

Ready to launch your business?

get a quote

Let’s f*****G GO !!