# Create account email address check should be case-insensitive

**URL:** https://meta.discourse.org/t/create-account-email-address-check-should-be-case-insensitive/15576
**Category:** Feature
**Created:** [May 12, 2014, 10:02pm UTC](https://meta.discourse.org/t/create-account-email-address-check-should-be-case-insensitive/15576 "2014-05-12T22:02:12Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [May 12, 2014, 10:02pm UTC](https://meta.discourse.org/t/create-account-email-address-check-should-be-case-insensitive/15576/1 "2014-05-12T22:02:12Z")

</div>

to reproduce:

1. sign up as [joe@example.com](mailto:joe@example.com)
2. sign up on same forum as [JOE@EXAMPLE.COM](mailto:JOE@EXAMPLE.COM)  
expected: “sorry, that email has already been taken”  
actual: new account is created

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 12, 2014, 10:04pm UTC](https://meta.discourse.org/t/create-account-email-address-check-should-be-case-insensitive/15576/2 "2014-05-12T22:04:05Z")

</div>

Not actually a bug – mail addresses (but not domains) are case sensitive, per Wikipedia:

> **[Email address](https://en.wikipedia.org/wiki/Email_address)**
>
> An email address identifies a mailbox to which email messages are delivered. While early messaging systems used a variety of address formats, email addresses today follow a specific set of rules originally standardized by the Internet Engineering Task Force (IETF) in the 1980s, and updated by .mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\\"""\\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parse...

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [May 12, 2014, 10:09pm UTC](https://meta.discourse.org/t/create-account-email-address-check-should-be-case-insensitive/15576/3 "2014-05-12T22:09:42Z")

</div>

Odd. As mentioned on that article, I have always seen [First.Last@example.com](mailto:First.Last@example.com) go to the same inbox as [first.last@example.com](mailto:first.last@example.com).

So I guess while its not technically a bug, it can be problematic.

I brought this up because a new user on our forum was having trouble signing in after they were approved - and now I see they just tried to sign up again with the other case as a different user name.

---

<div class="post-metadata">

### Author: ![eriko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eriko/32/1915_2.png) [@eriko](https://meta.discourse.org/u/eriko)
#### Post date: [May 12, 2014, 10:57pm UTC](https://meta.discourse.org/t/create-account-email-address-check-should-be-case-insensitive/15576/4 "2014-05-12T22:57:46Z")

</div>

It is due to the _ **Robustness principle** _ Otherwise know as Postel’s law that it works when you do that. It spread from TCP to SMTP.  
From the writeup:

“TCP implementations should follow a general principle of robustness: be conservative in what you do, be liberal in what you accept from others.”

> **[Robustness principle](https://en.wikipedia.org/wiki/Robustness_principle)**
>
> In computing, the robustness principle is a design guideline for software that states: "be conservative in what you do, be liberal in what you accept from others". It is often reworded as: "be conservative in what you send, be liberal in what you accept". The principle is also known as Postel's law, after Jon Postel, who used the wording in an early specification of TCP.
> In other words, programs that send messages to other machines (or to other programs on the same machine) should conform comple...

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [May 12, 2014, 11:01pm UTC](https://meta.discourse.org/t/create-account-email-address-check-should-be-case-insensitive/15576/5 "2014-05-12T23:01:42Z")

</div>

Personally, I think people should have to tick a very special site setting if they don’t want `bob@somewhere.com` to be treated exactly the same as `BOB@somewhere.com`

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [May 12, 2014, 11:14pm UTC](https://meta.discourse.org/t/create-account-email-address-check-should-be-case-insensitive/15576/6 "2014-05-12T23:14:53Z")

</div>

I am definitely coming around to this way of thinking.

---

<div class="post-metadata">

### Author: ![infogulch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/infogulch/32/125693_2.png) [@infogulch](https://meta.discourse.org/u/infogulch)
#### Post date: [May 14, 2014, 7:19pm UTC](https://meta.discourse.org/t/create-account-email-address-check-should-be-case-insensitive/15576/7 "2014-05-14T19:19:58Z")

</div>

According to your link

> The domain part is not case-sensitive, but local-parts may be.

So `bob@example.com` is strictly equivalent to `bob@EXAMPLE.COM` but _may_ be different from `BOB@example.com`. If you really wanted case-sensitive emails you’d have to parse out the case-insensitive domain portion and compare it separately from the local parts.

According to a comment in this [StackOverflow answer](http://stackoverflow.com/a/9808332) (emphasis mine):

> ‘In short, you are safe to treat email addresses as case-insensitive.’ I’d phrase it stronger: “you’re **unsafe** to treat email-addresses as case-sensitive manner” **Especially when checking for duplicates in user-databases** , etc.

Several email systems that are case-insensitive and that would cause problems if they were treated case-sensitively:

- [Microsoft Exchange](https://groups.google.com/forum/#!topic/microsoft.public.exchange.misc/ntNIQ-KAcMI)
- [Gmail](https://productforums.google.com/forum/#!topic/gmail/7zWQHgFIiKI) (Notable for being especially lax with [username manipulations](http://gmailblog.blogspot.com/2008/03/2-hidden-ways-to-get-more-from-your.html) such as allowing arbitrary periods and considering `name@gmail.com` equivalent to `name+X@gmail.com` for all valid `X`)
- [Yahoo Mail](https://answers.yahoo.com/question/index?qid=20080821160403AA4zhcH)
- [Outlook.com](http://answers.microsoft.com/en-us/outlook_com/forum/oemail-osend/why-does-outlook-not-have-case-sensitivity-will/d573d777-d630-4086-80e2-f0f2396aa7a4)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [July 12, 2014, 5:32am UTC](https://meta.discourse.org/t/create-account-email-address-check-should-be-case-insensitive/15576/8 "2014-07-12T05:32:55Z")

</div>

@neil is working on this next week.

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [July 16, 2014, 5:46pm UTC](https://meta.discourse.org/t/create-account-email-address-check-should-be-case-insensitive/15576/9 "2014-07-16T17:46:39Z")

</div>

This problem is fixed. Email is not case sensitive anymore!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 11, 2014, 2:21am UTC](https://meta.discourse.org/t/create-account-email-address-check-should-be-case-insensitive/15576/10 "2014-09-11T02:21:34Z")

</div>


