How to map Discourse Self Hosted to another Domain

AI-generated summary

Aniket_Singh has installed Discourse on a separate Azure Virtual machine and wants to map it to forums.example2.com instead of the current community.example.com. pfaffman advised running discourse-setup again and entering the desired domain name. Aniket_Singh expressed concerns about the servers being different, but pfaffman confirmed it would work as long as the names are different. Aniket_Singh is willing to try, and pfaffman reiterates that re-running discourse-setup with the desired name should resolve the issue.

I have installed Discourse on a separate Azure Virtual machine with 7GB Ram Server because on my main server i have apache with PHP and many more application, So now for e.g, my discourse is on community . example . com and main website is example2 . com.

How can i map Discourse website on example2.com Such as if open forum . example2 . com will eventually show community . example . com

I added CNAME record but it redirected me to community . example . com.

Run discourse-setup again and enter the domain name that you want your Discourse to respond to.

Will that work @pfaffman ? if they are on different server?

Yes. As long as they are different names (community.example.com, www.example.com, and example.com are all different), there is no problem.

okay let’s try. let me tell you currently discourse is on community.example.com and i want it on forums.example.com.

I don’t understand. Was my example wasn’t clear because I didn’t include forums.example.com as an example host name? If they have different names, it’s fine. Just re-run discourse-setup and use the name that you want for Discourse.