Plan Signup Rules (a.k.a. restrict signups by email domain)

Article author
Duncan from Memberstack

With a simple rule, you can limit plan signups based on the user's email address domain.

We also have a code snippet that you can use to block specific email domains

Let's say, for instance, you create a training course for a corporate client. With Memberstack, you can easily grant access to any company employee (with a corporate email account) and at the same time prevent the rest of the world from signing up. Here's how.

Creating a Rule

Screen_Shot_2023-02-07_at_1.19.20_PM.jpg

  1. Navigate to the plans page.
  2. Select a plan.
  3. Go to the panel on the right and expand the Signup Rules folder.
  4. Click the + Add button.

In the popup window:

  1. Enter the allowed domain.
  2. Click Save.
  3. Repeat steps to add more allowed domains. (optional)

a-1.png

Memberstack adds the rule to the plan. Click the ellipsis to edit or remove the signup rule.

a-4.png

  • BTW  This signup rule won't let you block certain email domains (e.g. prevent any user with a Yahoo email account from signing up). If you enable this feature, you block all users except people with the email domain listed in the rule. 

Testing the Rule

Memberstack displays and error message and blocks a user from signing up if the email domain does not match the rule.

a-3.png

 

That's it.

Now you know how to restrict plan signups with an email domain rule.

Was this article helpful?

Comments

5 comments

  • Comment author
    Jesper Vestergaard

    Is there a limit to how many domains you can whitelist this way?

    0
  • Comment author
    Duncan from Memberstack

    Hey Jesper 👋 I'm honestly not sure... I have not tested. How many do you need to whitelist?

    0
  • Comment author
    Jesper Vestergaard
    • Edited

    Hi Duncan! Up to around 200.

    0
  • Comment author
    Duncan from Memberstack

    Hmmm yeah, we might need to find another solution. I imagine the cap (if there is one) is around 50. 200 at the highest.

    What is your goal is limiting access to 200 emails? I wonder if there might be another way to achieve your goal. 

    0
  • Comment author
    Jesper Vestergaard

    It's for online membership for a group of institutions. The institutions pay offline and when they do, we whitelist their domains to allow their employees to get access online.

    0

Please sign in to leave a comment.