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 www.example.com, do i need to add www.example.com to Mailgun? Or example.com will work too?

2 לייקים

example.com is sufficient. You will need forum.example.com or other subdomain if your Discourse is on a subdomain.

3 לייקים

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

לייק 1

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

לייק 1

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

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

2 לייקים

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

Create a CNAME record that sets www.example.com as an alias of example.com.

לייק 1

No. They are . . . different.

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

See https://www.forcewww.com/

לייק 1

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

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 example.com with Mailgun
  • Install Discourse at www.example.com
  • The email arrived, but from unusual noreply@www.example.com instead of noreply@example.com. So I set the email via docker exec -it app rails r 'puts SiteSetting.notification_email = "noreply@example.com"' (in this case probably an easier way would be just to finish the admin registration and then set email in the /admin UI).
2 לייקים