How should I setup with www. domain?

I saw in the setup guide and other questions that I need to use the same subdomain for Mailgun. So if I want to install Discourse at, do i need to add to Mailgun? Or will work too?

3 Likes is sufficient. You will need or other subdomain if your Discourse is on a subdomain.


Ok, thanks. But I still need to use for DISCOURSE_HOSTNAME in app.yml, right?

1 Like

No. only the domain part - or - depending on your setup.

1 Like

hm, I thought www. is technically the same subdomain as forum.?

I want Discourse to be at (and redirects to www.)


You’ll make that setup in the DNS zone file.

Create a CNAME record that sets as an alias of

1 Like

No. They are . . . different.

I recommend that you configure mailgun to send from so that if you decide that you want to do something with mail and in the future it won’t be complicated by it sharing the domain with Discourse.


1 Like

probably not, the domain is just for forum. Also in this case I probably can just use another subdomain in the future like

I think I never saw anyone sending from foo@www.... Tried to search from:www in my gmail, no results.

I mean, as I understand www is just a subdomain, maybe with some special handling in some cases because it’s commonly used.

So what I ended up doing was:

  • Verify with Mailgun
  • Install Discourse at
  • The email arrived, but from unusual instead of So I set the email via docker exec -it app rails r 'puts SiteSetting.notification_email = ""' (in this case probably an easier way would be just to finish the admin registration and then set email in the /admin UI).