Issues with base_url after renaming forum

My forum recently changed the domain name and we’ve encountered a problem. We noticed that when emails were being sent out, they were still referencing the old domain. I took a look at the templates and found that the problem is occurring with the base URL. as a temporary fix to what our user base would most commonly utilise the emails for, I simply changed a few (like 4-5 of them, not all of them) of the templates to substitute the base url for the current domain.

More recently though, we added an admin to our forum. The email that was generated linked to the old domain and I suspect it is the same issue. The problem with this one is I cant find the email for confirming an admin addition in the email templates. In any sense, how do I go about changing the base url to the current domain from the console, since I know thats whats going to solve the problems we’ve encountered?

This should be the DISCOURSE_DOMAIN_NAME in your app.yml.


i went into the app.yml and didnt find that string, even after performing a search. there is a DISCOURSE_HOSTNAME string in the file, however that already contains the correct domain name. are there any other places to look? or any other strings it would be stored under?

Site setting : notification email

That’s also already correct

1 Like

I decided to open up the github repos for discourse and explore to see if I could find where to solve my problem. After about 20 minutes, I’ve ended up in /lib/email/message_builder.rb and found the first mention of a base_url as found in the email templates.

I’m not quite sure how to follow up on what I’ve found, as I’m trying to find where I can edit the value stored in the variable.

This may be a silly question, but have you rebooted your server lately? Some stuff can get cached in strange ways.

1 Like

I’ll have it done again tonight during my forum’s natural break in activity.

1 Like