502 Bad Gateway Certificate verify failed: self signed certificate in certificate chain

I am having trouble accessing numerous websites on my imac. I can access the exact same (various trusted/official websites) on other devices.


But on my desktop, I am experiencing very frustrating problems not being able to access these sites and instead getting the message :


502 Bad Gateway

Certificate verify failed: self signed certificate in certificate chain


I've followed the standard advice that is coming up in searches of clear cache/cookies. but to no avail.


It's stopping me from being able to work efficiently so I am keen to find a solution.


This is happening in Firefox, safari and chrome.


Thanks for any suggestions.


iMac (2017 – 2020)

Posted on Sep 29, 2025 6:55 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 29, 2025 7:41 AM

You may be experiencing the same problem as described in this recent Discussion: Suddenly unable to log in to my Treasury Direct account, especially if you are using an older macOS version. It appears to be related to the recent expiration of certain commonly used security certificates. As you discovered clearing cache / cookies etc won't help.


Scroll down to MrHoffman's reply referencing his User Tip Updating the Certificate Trust Store on m… - Apple Community for a potential solution.


Editorial comment, to be considered or disregarded as you see fit: All popular browsers and website developers are moving in the direction of imposing strict security protocols and shorter certificate duration. The likely short term result will be to require that everyone upgrade to more recent macOS versions, recent Macs, recent iPhones... etc. Since that is likely to be unpopular, the eventual long term solution will be the abandonment of browsers in general. In the future everything will be an app.

2 replies
Question marked as Top-ranking reply

Sep 29, 2025 7:41 AM in response to SKheart

You may be experiencing the same problem as described in this recent Discussion: Suddenly unable to log in to my Treasury Direct account, especially if you are using an older macOS version. It appears to be related to the recent expiration of certain commonly used security certificates. As you discovered clearing cache / cookies etc won't help.


Scroll down to MrHoffman's reply referencing his User Tip Updating the Certificate Trust Store on m… - Apple Community for a potential solution.


Editorial comment, to be considered or disregarded as you see fit: All popular browsers and website developers are moving in the direction of imposing strict security protocols and shorter certificate duration. The likely short term result will be to require that everyone upgrade to more recent macOS versions, recent Macs, recent iPhones... etc. Since that is likely to be unpopular, the eventual long term solution will be the abandonment of browsers in general. In the future everything will be an app.

Sep 30, 2025 5:06 AM in response to John Galt

Thanks very much for taking the time to reply and signpost that thread. My system keychain seems to be MIA from my utilities file, so that's not good! Not sure what to do about that.


In positive news though, I think I have found the culprit to the 502 bad gateway issue. Switching off 'enable HTTPS filtering' in Avast Antitrack appears to have done the trick.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

502 Bad Gateway Certificate verify failed: self signed certificate in certificate chain

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.