Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

husseinrubaie98's avatar

Uploaded CSS and js files not appearing on shared host

Hello,

Recently, I uploaded both css and js (index.css and index.js) files into public/css and public/js directories on a shared host (HostGator) but I had trouble not finding them. When I enter, for example, "https://www.mywebsite.com/css/index.css" it gives me a "404|Not Found" error, as well as it appears in the browser console. Note that I uploaded it into the project, and I can find it in cPanel/File Manager, and the permissions are 0644 (means the issue isn't in the permissions).

What's weird is that I've previously uploaded 3 files (2 .css and 1 .js file) and they're working normally. I don't know if this is an issue from Hostgator, or from LAravel (since it needs to compile them when they're in /resources before automatically adding them into public/). I think this might be the issue because, if I remember correctly, the working .css and .js files where uploaded with the whole project the first time.

I've searched a lot on the internet, but couldn't find any clue. So, can anyone help me with this? And I'd be so grateful, because I have to fix it to add a new feature to my project before the deadline.

Thanks in advance.

0 likes
5 replies
Snapey's avatar

Is public the root folder (you don't see public in your URLs) ?

husseinrubaie98's avatar

Yes it is. And as I told you: www.mywebsite.com/css/en.css opens normally, but www.mywebsite.com/css/index.css gives me a 404 error, though both en.css and index.css are in the same directory in my project (in public/css/).

Snapey's avatar

is it a laravel 404 page or from your web server?

Please or to participate in this conversation.