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 working as programmer since 2002. Born, grew up, studied and worked in Pakistan now Im located in Denmark since 2006.