Laravel - valet 404 not found

Stefan Bogdanescu
Founder & Senior Architect · 9 July 2026

Troubleshooting Valet's 404 Not Found Issue for Laravel Projects

Valet is an excellent tool for local development, providing a smooth workflow with HTTPS support. However, sometimes you may encounter issues when using it with your Laravel project. In this post, we will explore various reasons behind 404 not found errors in a Laravel project accessed via HTTPS and the steps to resolve them.

Common Causes of 404 Errors

  1. Misconfiguration: It’s possible that you may have configured your Valet properly for http connections but not for https. Make sure both commands are executed correctly:
    valet link backend-laravel
    

valet secure backend-laravel

  1. Server configuration: Your local server (MAMP, XAMPP, etc.) might require some adjustments to support HTTPS connections. Ensure that your server supports HTTPS properly and the SSL certificate is installed correctly.

  2. File permissions: Laravel’s public directory may have strict file permissions, preventing access from HTTPS requests. Check and correct the permissions on your project files and folders accordingly.

  3. Local network configuration: If you are using a local or virtual private network (VPN), it might be blocking your Valet’s port 80 and 443 (used for HTTP and HTTPS). Disconnect from your VPN temporarily to test if the issue is caused by this.

  4. Routing issues: Ensure that your routes in the Laravel project are properly set up, and the URL you are accessing matches exactly the route’s path. You may also need to configure the .env file with proper environment variables (e.g., APP_URL) for serving HTTPS URLs.

Resolving 404 Not Found Errors

To troubleshoot and fix these issues, follow this checklist:

  1. Confirm that your Valet configuration allows both http and https. If not, adjust the commands accordingly.

  2. Double-check your server’s configuration and SSL certificate installation. If needed, seek support from the respective server documentation or contact IT professionals for assistance.

  3. Make sure your local network is not blocking any necessary ports. Disconnect from VPNs or contact your network administrator to resolve this issue.

  4. Verify proper file permissions on your project files and folders in Laravel. Ensure that the public directory has the right permissions (e.g., 755) for accessing over HTTPS connections.

  5. Review your routing configuration, ensuring it matches your desired routes and URLs. Remember to update .env file settings if necessary.

Conclusion

In conclusion, troubleshooting Laravel’s 404 not found issues with Valet can be a complex process but is achievable with careful attention and systematic exploration of potential causes. Always refer to your server documentation or seek professional guidance when needed. To ensure smooth local development, keep your configurations in check and perform regular maintenance for your Laravel project.

Our network