If you are using Chrome and want to use https on your local server when developing, Chrome will block you unless you have a valid certificate. If you do not have a valid certificate but want to use https on localhost, you will have to bypass Chrome’s check. Here’s how:

  1. In the address bar type chrome://flags.
  2. In the search bar, search for the term certificates.
  3. The search result should display Allow invalid certificates for resources loaded from localhost..
  4. Click on the select menu to the right and choose Enabled.
  5. Chrome should ask you to restart the browser. If not, restart it manually.

Now you can use https on localhost bypassing Chrome’s check.