Add

Lorem ipsum

Lorem ipsum

A
A
A
CRO / Conversion

0 views

3 min

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.

good to know

This validation is client-side only: a savvy user can bypass it. For robust validation, reinforce it on the server side (via an n8n or Zapier webhook that checks the domain before adding the contact to your CRM). JS validation is still useful for reducing accidental mistakes and improving UX.

Conclusion

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

Good to know

Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Lorem ipsum dolor sit amet consectetur.

Lorem ipsum dolor sit amet consectetur. Aliquam orci sagittis dignissim sapien praesent donec.

Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Published on

You might be interested in these tutorials

Similar tutorials

SEO / GEO

5 min read

5 views

How to Set Up a Redirect in Webflow? (2026)

Updated on 19.12.2025 by Sandro DA SILVA

SEO / GEO

5 min read

5 views

Add structured data to your Webflow site?

Updated on 21.08.2025 by Sandro DA SILVA

No-code

5 min read

5 views

How to Obfuscate a Link in Webflow

Updated on 23.04.2025 by Sandro DA SILVA

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

Ready to launch
Your business?

Alexandre

Max

Enora

Bryan

Cannelle

Tiphaine

You'll :heart: our collaboration...