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:
- Go to the config page under the admin panel and select the accounts tab.
- 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.
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
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
In addition to subdomains, domain wildcards are also supported. For example
*.edu will only allow edu email addresses to register.