Resolved: forced HTTPS redirect in Homestead running Laravel app

Now a days most browsers enforce HTTPS, and this is bit of trouble in local development environment and some get annoyed due to this behavior.

And when working with Laravel & Homestead, this issue might occur.

Solutions to this  issue can very depending on your OS, I am on Ubuntu 18 Desktop.

Possible solutions for Ubuntu:

  • Self signed certificates, Take a look at GitGist.
  • I personally went for following solution:
    Use .test/.app as domain TLD

    • Update your Homestead.yaml, by changing
      – map: domain.test
      – to: /var/www/domain.test/public- map:
      – to: /var/www/
    • Under Homestead directory run
      • vagrant provision
      • Or vagrant destroy && vagrant up

But if you are interested in registering self certificate in Mac, follow this well written post, read now…

On Mac the best alternative to Homestead would be  Laravel Valet.
Out of the box, Valet support includes, but is not limited to:

Author: Danyal
I'm skilled programmer with expertise in Vue.js/Nux.js for front-end development and PHP Laravel for back-end development. I excel in building APIs and services, and also have experience in web server setup & maintenance. My versatile skill set allows you to develop and maintain web applications effectively, from the user interface to the server-side functionality. I love coding with never ending learning attitude, thanks for visiting