Skip to main content

Whitelisting Email Addresses

CTFd supports the whitelisting of email domains. Only administrators can add or remove domains from the account email whitelist.

To add a domain to the whitelist:

  1. Go to the config page under the admin panel and select the accounts tab.
  2. The first option is "Account Email Whitelist" and enter all the domains can be used for the competition separated with a comma. Leaving it blank will allow users to sign up with any email.

Allowing wildcard domains

It is possible to specify a wildcard within an allowed domain. For example if we wanted to allow email addresses from both example.com and its subdomains as well, we could set the whitelist as follows:

Note that it's only possible to whitelist the suffix of the domain, a whitelist like foo.*.example.com will not work.

tip

When including a base domain (example.com) as well as subdomains (*.example.com) it is required to specify both in the whitelist. To be specific, *.example.com alone will allow subdomains, but not example.com directly.

This can also be mixed with regular definitions, so a whitelist like acme.com, example.com, *.example.com is valid for emails within example.com, its subdomains, acme.com but not ext.acme.com.

In addition to subdomains, domain wildcards are also supported. For example *.edu will only allow edu email addresses to register.