Sage constantly redirects to SSL

I have a fresh development installation of Trellis, Bedrock and Sage on my local machine. WordPress runs fine on my local URL.

As soon as I start the Sage build with “yarn start”, the page opens on https://localhost:3000. There is a 301 redirect from http to https, resulting in a SSL_ERROR_RX_RECORD_TOO_LONG (normal, SSL is not configured).

The redirection is not coming from the Browser, because as soon as I stop the “watch” process, localhost:3000 is no longer being redirected (just the normal error message). I also tried other browsers, privacy mode and hard reload/cache clear.

I updated all dependencies and checked all configurations. SSL is disabled and all URLs begin with http, not https. Any idea where this redirection is coming from and how to resolve it?

If it stops when yarn stops, that sounds like a possible config.json misconfiguration. Can you post your config.json?


I already checked config.json, but your comment made me revisit the file. There was indeed a typo in the devUrl. Thank you for pointing me in the right direction! :slight_smile:

I’m still puzzled tho, why there was a redirection to https, as even the wrong devUrl contained the correct protocol. Anyway, glad it is solved.

1 Like