“Safari cannot open the page because the server cannot be found”

I am having a similar issue.
I am on Mac OS Sonoma 14.5 with an Apple M3 pro card. I just created a Mattermost server using docker. everything seems to be running fine in docker, but I cannot access my new domain in Safari or in Chrome. I get the error message that the server cannot be found.
I tried flushing the DNS cache, but it did not help.
Any advice would be more than welcome since this is my first time deploying a Mattermost server.
Thank you