How to normalize Gmail email addresses with dots

I’ve discovered that Gmail treats certain email addresses as the same thing. For example, [email protected] and [email protected] both deliver to the exact same inbox. This is causing issues in my application because I’m treating them as different users.

I need to find a way to standardize these Gmail addresses so they all get grouped together properly. What are the specific rules Gmail uses for this? I know dots get ignored, but are there other rules I should be aware of?

Has anyone dealt with this before? I want to make sure I’m handling all the edge cases correctly when processing Gmail addresses.

Hit this exact issue migrating user accounts between systems. Normalization isn’t just technical - you’ve got to think about UX impact too. When I did Gmail normalization, I built a canonical email function that strips dots and plus-sign stuff, but kept the original email address users entered. System catches duplicates internally while still sending emails to whatever format users expect. One gotcha I learned the hard way: handle existing users gracefully. If someone’s already registered with [email protected] and another person tries [email protected], you need a merge strategy or at least clear error messages. Also, @googlemail.com follows the same rules as @gmail.com since they’re the same domains.

same thing happened to me when users couldn’t log in with their “usual” email. One thing missing from other replies - test your normalization logic hard because edge cases get weird. What if there’s consecutive dots or dots at the start? Gmail handles it fine but your code might crash. Also, normalization only works one direction - you’ll get emails sent to the dotted version, but Gmail won’t let you send FROM a dotted address.

Gmail’s normalization goes beyond dots. The plus sign is also important; anything after a plus gets ignored, so [email protected] and [email protected] hit the same inbox. I encountered this issue while building user registration and had to implement proper normalization. For Gmail addresses, remove all dots from the local part (before the @) and strip everything from the first plus onward. Case sensitivity doesn’t matter as Gmail treats upper and lowercase the same. However, this only applies to @gmail.com and @googlemail.com domains, so don’t use these rules for other providers, as they handle dots and plus signs differently. This normalization helped prevent duplicate accounts but confused some existing users who registered with different variations.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.