As a backend developer, What should you do with users' gmail accounts that contains dots?

zeyadetman profile image Zeyad Etman ・1 min read

Hi, If you have a gmail account, you can create multiple accounts using same email, just put dots between characters, But as a backend developer should you consider this case or not?

In the thread below i just pointed to this case.


markdown guide

Treat them as separate email addresses, because they are separate email addresses. What one email provider chooses to do with them is theirs and the user's business.


What Ben said. Trying to treat the situation differently will only create future problems and user confusion.

On a side note, you can also use the + trick with Gmail (e.g. johnsmith@gmail.com and johnsmith+devto@gmail.com go to the same mailbox). Other places allow the same thing but with dashes instead.

There are a lot of varieties - it's best not to try to manage them without a VERY good reason.


Some validation/sanitization libs support gmail addresses and can treat them as one address.

For example:

test@gmail.com -> test@gmail.com
te.st@gmail.com -> test@gmail.com

For reference: npmjs.com/package/validator


You shouldn't do this for the simple fact that if a user has entered their email twice like this, then they're expecting them to behave like 2 separate addresses. It's just extra overhead on your platform.


Wow. I've never thought of this. I have no solution but following to see what others say.