Restrict Email Domain for WordPress does exactly this with advanced controls:
- Allowed domains (whitelist) — only allow registrations from specific domains like @ourcompany.com. Everyone else is blocked.
- Banned domains (blacklist) — block disposable email services by domain. Comes with a default list you can extend.
- Wildcard support — use patterns like *.company.com to allow all subdomains, or .temp to block all temp domains.
- Specific email whitelist — allow individual email addresses to override domain restrictions (e.g., allow a contractor's Gmail).
- Real-time validation — AJAX validation shows instant feedback as users type their email. They know immediately if their domain is accepted.
- Custom error messages — show a helpful message with domain suggestions when someone is blocked.
- Activity logging — logs all blocked attempts with analytics, CSV export, and configurable retention.
- Email notifications — get notified when someone is blocked.
Works with WordPress core registration, BuddyPress, WooCommerce, Ultimate Member, MemberPress, PMPro, RCP, WP-Members, and Multisite.