Are you on shared hosting?
Try calling http://yoursite.com/.env
Do you get your .env file? If so that is really bad!
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Everything works fine on my local environment, but on hosting, all routes are accessible with /public except for homepage.
So when i go to example.com/public it doesn't work and give 404 error, but if go to example.com/public/someroute that is accessible. Similarly all other routes like /public/categories, /public/categories/posts etc.
Google Search Console is excluding all URL's with /public because of canonical settings.
Any help please. How to fix this.
I found the issue. Runcloud.io have setting for public path in app > settings, where i needed to add /public directory. Which fixed the issue.
I checked /.env file and multiple other files which are outside public directory and none of them were accessible. Site was working fine with root domain as well.
Hopefully this will help some other users on runcloud.io if they miss that public path setting for laravel app.
Thanks @sinnbeck
Please or to participate in this conversation.