When I set up this blog, I listed my email address with a + tag in it — a habit I’ve acquired. But I found that the + generated more questions than my blog posts! And, I thought, hey, blogs are for answering questions, so… read on!

What is in an email address?

My blog email address is scott.stafford+gh@gmail.com. The ubiquitous @ and all the other characters are described in the official specification for email addresses, called RFC 2822 § 3.4.1. Per that document, everything before the @ is called the local-part, and interpreting it is entirely up to the mail server at domain, which is the part after the @, so in my case:

  • local-part is scott.stafford+gh
  • domain is gmail.com

The mail server will use that local-part to figure out whose mailbox to deliver the email to. But many mail servers also play a few games before they deliver the mail. For instance, Gmail completely ignores all ., so scott.stafford@gmail.com and s.c.o.t.t.s.t.a.f.f.o.r.d@gmail.com will both go to the same place. Most other mail servers don’t ignore . though, so sprinkling periods around for fun mostly only works with Gmail.

What does the plus sign (+) do?

The +, like the ., is treated specially by some common mail servers, such as Gmail, Outlook.com, and iCloud. These mail servers intentionally ignore the plus and everything after it when routing mail. Yahoo uses the hyphen (-) for the same purpose. So, scott.stafford+gh@gmail.com and scott.stafford@gmail.com and scott.stafford+i.love.plusses@gmail.com all go to the same mailbox. Others may use something else.

What are aliases good for?

Even though the mail server ignored the + when routing, it’s still there in the email. You can take advantage of it when searching or filtering your mailbox, and it’s still a unique address as far as other sites are concerned.

This can be handy in a number of ways. On this blog, I use it so that if you email me, I know you found me via the blog. More generally, it’s useful for:

  • Trackable email addresses: If you sign up for some website that requires an email address (especially if they might spam), using a + alias lets you create a filter for the stuff they send. Also, you’ll know who they sold/shared your email address to, because they’ll all come to the aliased address.
  • Account testing: If (as I mentioned above) you’re developing/testing a website that requires unique email addresses for each user, but you need to sign up multiple times, the site will treat each email alias as unique but send the confirmation emails to the same convenient place.