# Unable to change email address after switching domains

**URL:** <https://meta.discourse.org/t/unable-to-change-email-address-after-switching-domains/60374>\
**Category:** Product Support\
**Created:** [2017 年 4 月 3 日午後 12:43 UTC](https://meta.discourse.org/t/unable-to-change-email-address-after-switching-domains/60374 "2017-04-03T12:43:12Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![john-lynch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/john-lynch/32/81514_2.png) [@john-lynch](https://meta.discourse.org/u/john-lynch)\
**Post date:** [2017 年 4 月 3 日午後 12:43 UTC](https://meta.discourse.org/t/unable-to-change-email-address-after-switching-domains/60374/1 "2017-04-03T12:43:12Z")

</div>

I’ve just started hosting a very small, private Discourse community. I’m a newbie; please be gentle.

When I originally set the community up, I set it up at [foo.com](http://foo.com). My members and I hadn’t determined what permanent domain we’d like, so I set one up temporarily. After we’d made that determination to switch to [bar.com](http://bar.com), I followed the instructions [here](https://meta.discourse.org/t/change-the-domain-name-or-rename-my-discourse/16098) to change the domain. It worked almost perfectly.

There was one slight hitch: originally, my admin account was set in Discourse to use the email address [admin@foo.com](mailto:admin@foo.com). The hostname for the Discourse install was simply [foo.com](http://foo.com); I did not use a subdomain. When I changed domains, I decided to use [www.bar.com](http://www.bar.com) as the hostname; in other words, the original hostname did _not_ include the www subdomain, but the new one did. The problem is two-fold: first, the instructions above for switching domains caused the admin email account to be changed to [admin@www.bar.com](mailto:admin@www.bar.com) (I assume it was the remap/rebake step that did this; willing to be wrong about this); second, when I try to correct the email address (to [admin@bar.com](mailto:admin@bar.com)), Discourse keeps trying to email [admin@www.bar.com](mailto:admin@www.bar.com) (according to my sparkpost message logs), which doesn’t exist. I assume it’s supposed to email the _new_ email address so that I can confirm it exists. The result is that I have no way to get a correct email address for my admin account: the domain switch step changed it to something invalid, and the change email process keeps emailing an invalid address.

I’m new enough at this that I’m not sure if I’m reading the situation correctly. I’m happy to answer any questions. Thanks for you assistance and patience.

---

_[View the full topic](https://meta.discourse.org/t/unable-to-change-email-address-after-switching-domains/60374)._
