Laravel - valet 404 not found
Stefan Izdrail
Founder & Senior Architect · 2026-06-29
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
2. 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.
3. 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.
4. 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.
5. 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.