# Allowed email domains

> Limit who can sign in to your workspace, and who can be added to it, to people with addresses at your company's email domains.

Allowed email domains keep your workspace to your own company. With a list set, only people whose address is at one of those domains can use the workspace, by any method, and nobody outside them can be added. The list applies straight away, to people already in the workspace too. With the list empty, any address is allowed. Administrators set it under **Settings → Security**.

It applies to your team only. Customers can still write in from any address.

## Setting your domains

1. Go to **Settings → Security**.
2. Under **Allowed email domains**, enter your domains separated by commas, such as `acme.com, acme.co.uk`.
3. Select **Save**.

To remove the restriction, clear the field and save.

A few rules:

- **Exact domains only.** `acme.com` allows `sam@acme.com` but not `sam@eu.acme.com`. List each subdomain you use.
- **Your own domain must be on the list.** Lagotto won't save a list that leaves out the address you're signed in with, since that would lock you out.
- **Check the spelling.** A value that isn't a domain is refused with "has an invalid domain".

The change is recorded in the [audit log](https://www.lagottolabs.ai/support/people-and-security/audit-log.md), with the old and new lists.

## What it restricts

Once you have a list, it's the address on the person's seat in Lagotto that counts:

- **Password sign-in.** Someone outside the domains sees "Try another email address or password," the same as for a wrong password.
- **Google and Microsoft sign-in.** They see that their address isn't allowed to sign in to this workspace. Someone whose Google or Microsoft account is at an allowed domain is still refused if the address on their seat isn't.
- **Being signed in.** Anyone outside the domains who is already signed in is sent to the sign-in page on their next click.
- **Password resets.** **Forgot password?** sends nothing to an address outside the domains, and reset links sent before the list changed stop working.
- **API keys and connected apps.** Keys that act as someone outside the domains, and apps such as Claude they connected, stop working.
- **Adding people.** Under **Settings → Team**, the form says which domains an address must be at, and refuses any other. The same goes for changing someone's address.
- **Joining automatically.** Letting people join with single sign-on only works with at least one allowed domain, and only for those domains. See [Single sign-on](https://www.lagottolabs.ai/support/people-and-security/single-sign-on.md).

## People already in the workspace

Setting a list doesn't remove anyone, but it applies to them at once. When you save, Lagotto says how many people on your team are outside the new list. They:

- Lose access straight away, by every method above
- Stay on **Settings → Team**, marked **Address not allowed** under **Sign-in**, and keep using a seat
- Keep their API keys and connected apps, which aren't revoked

To let someone back in, either:

- Add their domain to the list. Everything they had works again, their browser sign-in included.
- Change their address to one at an allowed domain under **Settings → Team**. They sign in again with the new address, and apps they connected need connecting again. See [Changing someone's email address](https://www.lagottolabs.ai/support/people-and-security/adding-and-removing-people.md#changing-someone-s-email-address).

To free their seat instead, deactivate them. See [Adding and removing people](https://www.lagottolabs.ai/support/people-and-security/adding-and-removing-people.md).

## Allowed domains or single sign-on?

They work together. Allowed email domains decide whose address may get in by any method. [Single sign-on](https://www.lagottolabs.ai/support/people-and-security/single-sign-on.md) decides how people prove who they are. Many workspaces use both: their company domain on the list, and Google or Microsoft for signing in.
