Problem connecting to Atlas MongoDB from Compass

I am getting connection error when attempting to connect to Atlas from MongoDB Compass:
Hostname/IP does not match certificate’s altnames: Host: is not in the cert’s altnames: DNS:*,

The connection worked fine previously, I am using Compass Version 1.34.2 (1.34.2) on MacOS Monterey V12.6.

Can anyone assist? Thanks

@George_89197 would you be able to share a screenshot of your connection screen and/or more of your connection string? that error makes us think you are connecting with an invalid certificate but it’s hard to tell without more details.

What version of Compass was working for you? Did you get this error when using a favorite connection after upgrading Compass? And finally, are you able to connect from the command line with mongosh?

Hi - many thanks for your response. I am using Compass Version 1.34.2 (1.34.2) on MacOS Monterey 12.6.

The connection string copied from Atlas:

I dont have mongosh installed, so I have tried connecting from the command line.


The connect string from Atlas does not seem to be correct for the Compass version you are using
Check/tick appropriate version while choosing the connect using Compass method
It would have given you SRV type connect string

I selected v1.12 or later which gives the connect string:
but that also does not work:

May be some dns or firewall issue
Did you try from another location or diferent network,wifi or mobile hotspot

Many thanks for your input. I tried connecting via ExpressVPN and it works! I spent hours trying to resolve this issue, and I still dont understand why re-directing via ExpressVPN solves the problem.

You have a uncooperative DNS server. Either the one you use directly or one upstream from it if it forwards queries. Not an uncommon problem seen here.

If you want to NOT use a VPN then get the DNS server fixed, updated, replaced.

For work, get the IT team involved, these are basic DNS records that have been around for years and should be used.

For home, check that routers have up to date firmware/software. Try different DNS servers; google’s, OpenDNS’s. Or you can run your own DNS caching server.

If you have a particularly obnoxious ISP who intercepts DNS then VPN might be the only recourse to using mongodb+srv:// URIs/

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.