Got a strange error when I transferred our forum to the new server and new domain

How did you move to the new domain? Did you use Change the domain name or rename my Discourse? Another way is to backup and restore. Restoring on a new domain name will update the hostname.