# Automatically add users to group based on part of email domain

**URL:** https://meta.discourse.org/t/automatically-add-users-to-group-based-on-part-of-email-domain/211166
**Category:** Support
**Created:** [December 5, 2021, 9:05pm UTC](https://meta.discourse.org/t/automatically-add-users-to-group-based-on-part-of-email-domain/211166 "2021-12-05T21:05:18Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)
#### Post date: [December 17, 2021, 7:13am UTC](https://meta.discourse.org/t/automatically-add-users-to-group-based-on-part-of-email-domain/211166/3 "2021-12-17T07:13:19Z")

</div>

This is quite important for me as two of the domains (government ones) each have dozens or maybe hundreds of subdomains and it wouldn’t be feasible to keep track of them manually.

One of the posts quoted above ends with the following sentence, which makes me hopeful:

> [@Automatic registration domain wild card](https://meta.discourse.org/t/automatic-registration-domain-wild-card/146933/3):
>
> @techAPJ can you adjust the group regex… carefully and make sure it is tested so it also allows subdomains.

---

_[View the full topic](https://meta.discourse.org/t/automatically-add-users-to-group-based-on-part-of-email-domain/211166)._
