Configure email domain rules
Set up allowed domains for organization auto-join and configure restrictions for generic and disposable email sign-ups
Email domain rules control how users join your application in two ways: by restricting who can sign up and by enabling automatic organization membership for trusted domains. These rules help maintain data quality, prevent abuse, and streamline onboarding for enterprise customers.
Sign-up restrictions block registrations and invitations from generic email providers (like Gmail or Outlook) and disposable email services, ensuring your user base consists of verified business contacts. Allowed email domains enable users with matching email addresses to automatically join organizations through the organization switcher, reducing manual invitation overhead.
Together, these features give you fine-grained control over user addition—blocking unwanted sign-ups while facilitating seamless access for legitimate users from trusted domains.
Set up sign-up restrictions
Section titled “Set up sign-up restrictions”Sign-up restrictions help you maintain data quality and prevent abuse by controlling who can create accounts in your application. This is particularly important for B2B applications where you need to ensure users have legitimate business email addresses rather than personal or temporary accounts.
These restrictions automatically block registrations and invitations from two types of email addresses:
- Generic email domains - Public email providers like
@gmail.com,@outlook.com, or@yahoo.comthat anyone can use - Disposable email addresses - Temporary email services often used for spam, trial abuse, or avoiding accountability
When enabled, these restrictions apply to both direct signups and organization invitations, ensuring consistent policy enforcement across your application. This prevents users from creating multiple trial accounts, maintains clean analytics, and ensures your user base consists of verified business contacts.
The following diagram illustrates how sign-up restrictions work:
How restrictions affect invitations
Section titled “How restrictions affect invitations”- Any user with a disposable email domain cannot sign up to create a new organization and cannot be invited to any existing organization.
- Any user with a public email domain cannot sign up to create a new organization and cannot be invited to any existing organization.
Set sign-up restrictions
Section titled “Set sign-up restrictions”-
Navigate to sign-up restrictions settings
Section titled “Navigate to sign-up restrictions settings”Go to Dashboard > Authentication > General and locate the sign-up restrictions section.
-
Configure restriction options
Section titled “Configure restriction options”Toggle the following options based on what suits your application:
- Block disposable email domains: Prevents temporary/disposable email addresses from signing up or being invited
- Block public email domains: Prevents generic email providers like Gmail, Outlook, Yahoo from creating organizations

-
Save your settings
Section titled “Save your settings”Click Save to apply the restrictions. Changes take effect immediately for all new signups and invitations.
Configure allowed email domains
Section titled “Configure allowed email domains”Allowed email domains lets organization admins define trusted domains for their organization. When a user signs in or signs up with a matching email domain, Scalekit suggests the user to join that organization in the organization switcher so the user can join the organization with one click. This feature is authentication-method agnostic: regardless of whether a user authenticates via SSO, social login, or passwordless authentication, organization options are suggested based on their email domain.
When a user signs up or signs in, Scalekit will automatically:
- Match email domains - Check if the user’s email domain matches configured allowed domains for any organization.
- Suggest organization options - Show the user available organizations they can join through an organization switcher.
- Enable user choice - Allow users to decide which of the suggested organizations they want to join.
- Create organization membership - Automatically add the user to their selected organization.
Manage allowed email domains in Scalekit Dashboard
Section titled “Manage allowed email domains in Scalekit Dashboard”Allowed email domains can be configured for an organization through the Scalekit Dashboard.

- Navigate to Organizations and select an organization.
- Navigate to Overview > User Management > Allowed email domains.
- Add or edit allowed email domains for automatic suggestions/provisioning.
Manage allowed email domains API
Section titled “Manage allowed email domains ”Configure allowed email domains for an organization programmatically through the Scalekit API. Before proceeding, complete the steps in the installation guide.
# 1. Register an allowed email domain# Use case: Restrict user registration to specific company domains for B2B applicationscurl 'https://<SCALEKIT_ENVIRONMENT_URL>/api/v1/organizations/{organization_id}/domains' \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "domain": "customerdomain.com", "domain_type": "ALLOWED_EMAIL_DOMAIN"}'
# 2. List all registered allowed email domains# Use case: Display domain restrictions in admin dashboard or verify current settingscurl 'https://<SCALEKIT_ENVIRONMENT_URL>/api/v1/organizations/{organization_id}/domains'
# 3. Get details of a specific domain# Use case: Verify domain configuration or retrieve domain metadatacurl 'https://<SCALEKIT_ENVIRONMENT_URL>/api/v1/organizations/{organization_id}/domains/{domain_id}'
# 4. Delete an allowed email domain# Use case: Remove domain restrictions or clean up unused configurationscurl 'https://<SCALEKIT_ENVIRONMENT_URL>/api/v1/organizations/{organization_id}/domains/{domain_id}' \ --request DELETE// 1. Register an allowed email domain// Use case: Restrict user registration to specific company domains for B2B applicationsconst newDomain = await scalekit.createDomain("org-123", "customerdomain.com", { domainType: "ALLOWED_EMAIL_DOMAIN",});
// 2. List all registered allowed email domains// Use case: Display domain restrictions in admin dashboard or verify current settingsconst domains = await client.domain.listDomains(organizationId);
// 3. Get details of a specific domain// Use case: Verify domain configuration or retrieve domain metadataconst domain = await client.domain.getDomain(organizationId, domainId);
// 4. Delete an allowed email domain// Use case: Remove domain restrictions or clean up unused configurations// Caution: Deletion is permanent and may affect user accessawait client.domain.deleteDomain(organizationId, domainId);