How to Trust the Charles Proxy Certificate on macOS
If you're using Charles Proxy to monitor network traffic, especially HTTPS traffic, you'll need to trust the Charles Proxy certificate on your macOS system. This guide will walk you through the steps to get everything set up smoothly.
Step-by-Step Guide
1. Install the Charles Proxy Certificate
First, let's install the Charles Proxy certificate on your Mac.
- Open Charles Proxy.
- In the menu, go to
Help
>SSL Proxying
>Install Charles Root Certificate
. - This will open the Keychain Access application on your Mac with the Charles Proxy certificate already highlighted.
2. Trust the Certificate in Keychain Access
Next, we need to make sure your Mac trusts this certificate.
- In Keychain Access, locate the Charles Proxy certificate. It should be in either the
System
keychain or thelogin
keychain. - Double-click on the Charles Proxy certificate to open its details.
- In the details window, find the
Trust
section and expand it. - Set
When using this certificate
toAlways Trust
. - Close the certificate details window. You might be prompted to enter your macOS password to confirm the changes.
3. Enable SSL Proxying in Charles Proxy
Now, let's turn on SSL proxying in Charles Proxy.
- Go to the menu
Proxy
>Start SSL Proxy
.
4. Restart Charles Proxy and Your Browser
To make sure everything is set up correctly, restart both Charles Proxy and your web browser.
- Quit and restart Charles Proxy.
- Quit and restart your web browser.
By following these steps, your Mac should now trust the Charles Proxy certificate, and you should be able to inspect HTTPS traffic without any issues.
Troubleshooting Tips
If you still run into problems, here are a few things to check:
- Make sure the Charles Proxy certificate is correctly installed in Keychain Access.
- Verify that the certificate is set to
Always Trust
. - Ensure that SSL Proxying is enabled in Charles Proxy.
For more detailed help, you can check out the Charles Proxy documentation.
And that's it! With these steps completed, you should be all set to monitor HTTPS traffic using Charles Proxy on your macOS system. Happy debugging!