47

I'm getting this warning for visiting non https site as https

enter image description here

Tried this to disable it by adding that command to shortcut target, but it doesnt work.

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -ignore-urlfetcher-cert-requests

Is there any possible method to disable ssl check for websites ?

user198989
  • 4,574
  • 19
  • 66
  • 95
  • Disabling the certificate check destroys the security of SSL. Don't do that. – SLaks Oct 15 '14 at 17:28
  • I know, but need to do it for our project before it will be published. – user198989 Oct 15 '14 at 17:29
  • Also see [Why am I suddenly getting a “Blocked loading mixed active content” issue in Firefox?](http://stackoverflow.com/q/18251128/608639). [Mixed content causes specific browser behavior](http://www.w3.org/TR/2014/WD-mixed-content-20140722/) per the W3C. – jww Oct 15 '14 at 18:15

3 Answers3

73

To disable the errors windows related with certificates you can start Chrome from console and use this option: --ignore-certificate-errors.

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --ignore-certificate-errors

You should use it for testing purposes. A more complete list of options is here: http://peter.sh/experiments/chromium-command-line-switches/

Yuri
  • 4,254
  • 1
  • 29
  • 46
Enrique Palacio
  • 1,521
  • 13
  • 8
21

Mac Users please execute the below command from terminal to disable the certificate warning.

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --ignore-certificate-errors --ignore-urlfetcher-cert-requests &> /dev/null

Note that this will also have Google Chrome mark all HTTPS sites as insecure in the URL bar.

Vashiru
  • 28
  • 6
maxmithun
  • 1,089
  • 9
  • 18
  • this works, but the spaces are not escaped in your answer use this `/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --ignore-certificate-errors` – santiago arizti Mar 07 '18 at 19:41
  • this should be ```open -a Google\ Chrome --args --ignore-certificate-errors --ignore-urlfetcher-cert-requests``` – Antwan van Houdt Mar 04 '19 at 04:01
  • 1
    Thanks! `--ignore-certificate-errors --ignore-urlfetcher-cert-requests` also seems to be working on Ubuntu. – Christian Baumann Apr 15 '19 at 06:55
  • These errors are there for a reason... Globally disabling them seems like a really bad idea... – Sancarn Apr 04 '21 at 10:30
  • Working on Chrome 92 on Windows 10 20H2. Altough Chrome warns "this is a bad idea", broken HTTPS sites can be displayed. – SonicARG Aug 04 '21 at 23:39
11

In my case I was developing an ASP.Net MVC5 web app and the certificate errors on my local dev machine (IISExpress certificate) started becoming a practical concern once I started working with service workers. Chrome simply wouldn't register my service worker because of the certificate error.

I did, however, notice that during my automated Selenium browser tests, Chrome seem to just "ignore" all these kinds of problems (e.g. the warning page about an insecure site), so I asked myself the question: How is Selenium starting Chrome for running its tests, and might it also solve the service worker problem?

Using Process Explorer on Windows, I was able to find out the command-line arguments with which Selenium is starting Chrome:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=12207 --safebrowsing-disable-auto-update --test-type=webdriver --use-mock-keychain --user-data-dir="C:\Users\Sam\AppData\Local\Temp\some-non-existent-directory" data:,

There are a bunch of parameters here that I didn't end up doing necessity-testing for, but if I run Chrome this way, my service worker registers and works as expected.

The only one that does seem to make a difference is the --user-data-dir parameter, which to make things work can be set to a non-existent directory (things won't work if you don't provide the parameter).

Hope that helps someone else with a similar problem. I'm using Chrome 60.0.3112.90.

sammy34
  • 5,312
  • 5
  • 29
  • 42