As the information about a domain is placed in multiple locations in the database, a single WordPress website is not really good at responding to two or more different domains. You can try setting up your domains to forward to the canonical domain.
Check this guide here:
https://myjeeva.com/mapping-multiple-domains-into-single-instance-of-wordpress.html