I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution in case you'd like to "Accept" the answer.
Issue: You were experiencing an issue with configuring an application gateway for two domains. The HTTPServer is configured to redirect website2 to website1, and accessing website2 as https://domain2.com displays the message "NET::ERR_CERT_COMMON_NAME_INVALID" on the Chrome browser.
Solution: The solution in this case was to use multi-site HTTP(S) listener. Multiple site hosting enables you to configure more than one web application on the same port of application gateways using public-facing listeners. It allows you to configure a more efficient topology for your deployments by adding up to 100+ websites to one application gateway. You followed this tutorial to configure listeners and rules based on two domains to make sure web traffic arrives at the appropriate servers in the pools.
If you have any other questions or are still running into more issues, please let me know.
Thank you again for your time and patience throughout this issue.
Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution