# Can domain name of discourse hosting and sending emails be different?

**URL:** https://meta.discourse.org/t/can-domain-name-of-discourse-hosting-and-sending-emails-be-different/62800
**Category:** Self-hosting
**Tags:** email
**Created:** [Mai 16, 2017, 1:30 UTC](https://meta.discourse.org/t/can-domain-name-of-discourse-hosting-and-sending-emails-be-different/62800 "2017-05-16T13:30:06Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Abhinav\_Singh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abhinav_singh/32/121012_2.png) [@Abhinav\_Singh](https://meta.discourse.org/u/Abhinav_Singh)
#### Post date: [Mai 16, 2017, 1:30 UTC](https://meta.discourse.org/t/can-domain-name-of-discourse-hosting-and-sending-emails-be-different/62800/1 "2017-05-16T13:30:06Z")

</div>

Hi,

I’m configuring emails for my discourse hosting. Discourse is hosted at [discuss.xxxx.com](http://discuss.xxxx.com).

I read in the documentation that for emails to work properly, we must verify and use the subdomain, e.g. [discourse.example.com](http://discourse.example.com). So in my case sending domain must be [discuss.xxxx.com](http://discuss.xxxx.com)

I’m using SendGrid to send emails and in SendGrid white label domains can not have the same name as one of the subdomains in DNS. So I’ll not be able to have [discuss.xxxx.com](http://discuss.xxxx.com) as my verified sending domain.

I’m curious, can I set sending domain different than the discourse domain? I would prefer to set sending domain as [forum@xxxx.com](mailto:forum@xxxx.com) or [forum.xxxx.com](http://forum.xxxx.com) ..what can be implications of this?

Looking forward to hear your views on this

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [Mai 16, 2017, 7:05 UTC](https://meta.discourse.org/t/can-domain-name-of-discourse-hosting-and-sending-emails-be-different/62800/2 "2017-05-16T19:05:39Z")

</div>

If your mail service is configured to send from the domain you use, it’s fine. You can change the address that Discourse sends from by changing the `notification email` setting.

For the chicken-egg case where you need to receive email to gain access to your Discourse installation, you can edit the bottom of `app.yml` that looks like this:

```yml
run:
  - exec: echo "Beginning of custom commands"
  ## If you want to set the 'From' email address for your first registration, uncomment and change:
  ## After getting the first signup email, re-comment the line. It only needs to run once.
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec: echo "End of custom commands"

```

---

<div class="post-metadata">

### Author: ![Abhinav\_Singh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/abhinav_singh/32/121012_2.png) [@Abhinav\_Singh](https://meta.discourse.org/u/Abhinav_Singh)
#### Post date: [Mai 16, 2017, 9:36 UTC](https://meta.discourse.org/t/can-domain-name-of-discourse-hosting-and-sending-emails-be-different/62800/3 "2017-05-16T21:36:05Z")

</div>

Hi Jay,

Yes, I can change the app.yml and rebuild the app.

You mean it is completely fine to set sending domain as [forum@abc.com](mailto:forum@abc.com) or [noreply@forum.abc.com](mailto:noreply@forum.abc.com) even if discourse domain is [discuss.abc.com](http://discuss.abc.com) right?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [Mai 16, 2017, 9:38 UTC](https://meta.discourse.org/t/can-domain-name-of-discourse-hosting-and-sending-emails-be-different/62800/4 "2017-05-16T21:38:22Z")

</div>

Yes, it’s fine if your mail delivery service will do it.

And, if you already have admin access to your Discourse, don’t change `app.yml`, just change `notification_email` in settings.

---

<div class="post-metadata">

### Author: ![achamess](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/achamess/32/120563_2.png) [@achamess](https://meta.discourse.org/u/achamess)
#### Post date: [Septembre 14, 2017, 2:11 UTC](https://meta.discourse.org/t/can-domain-name-of-discourse-hosting-and-sending-emails-be-different/62800/5 "2017-09-14T14:11:31Z")

</div>

So for example, my domain is [gofishcarolinas.com](http://gofishcarolinas.com)  
I verified my email on elastic email using this domain, not [discourse.gofishcarolinas.com](http://discourse.gofishcarolinas.com)

Now, in the `app.yml` file, I should change that email to what? [admin@gofishcarolinas.com](mailto:admin@gofishcarolinas.com)? This is for the first registration email.

Thanks.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [Septembre 14, 2017, 2:51 UTC](https://meta.discourse.org/t/can-domain-name-of-discourse-hosting-and-sending-emails-be-different/62800/6 "2017-09-14T14:51:33Z")

</div>

You can edit `app.yml` with `nano` to set the notification\_email setting. At the bottom, you’ll see this:

```plaintext
  - exec: echo "Beginning of custom commands"
  ## If you want to set the 'From' email address for your first registration, uncomment and change:
  ## After getting the first signup email, re-comment the line. It only needs to run once.
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec: echo "End of custom commands"

```

---

<div class="post-metadata">

### Author: ![achamess](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/achamess/32/120563_2.png) [@achamess](https://meta.discourse.org/u/achamess)
#### Post date: [Septembre 14, 2017, 2:54 UTC](https://meta.discourse.org/t/can-domain-name-of-discourse-hosting-and-sending-emails-be-different/62800/7 "2017-09-14T14:54:44Z")

</div>

I see that. Thanks. I’m just asking, what specifically should I change the setting to?

Based on the tutorial, I made [noreply@gofishingcarolinas.com](mailto:noreply@gofishingcarolinas.com) Would that be appropriate?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [Septembre 14, 2017, 2:55 UTC](https://meta.discourse.org/t/can-domain-name-of-discourse-hosting-and-sending-emails-be-different/62800/8 "2017-09-14T14:55:59Z")

</div>

Any address that you’ve configured elasticemail to send should work.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [Septembre 28, 2019, 2:13 UTC](https://meta.discourse.org/t/can-domain-name-of-discourse-hosting-and-sending-emails-be-different/62800/9 "2019-09-28T14:13:46Z")

</div>



---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [Mai 20, 2023, 5:58 UTC](https://meta.discourse.org/t/can-domain-name-of-discourse-hosting-and-sending-emails-be-different/62800/10 "2023-05-20T05:58:09Z")

</div>



---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [Mai 20, 2023, 6:23 UTC](https://meta.discourse.org/t/can-domain-name-of-discourse-hosting-and-sending-emails-be-different/62800/11 "2023-05-20T06:23:06Z")

</div>


