# Error 404 for vite css asset files

**URL:** <https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549>\
**Category:** Hosting Support\
**Created:** [May 14, 2022, 5:55pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549 "2022-05-14T17:55:14Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon28983508](https://forum.infinityfree.com/letter_avatar/anon28983508/32/6_22734026db12803ebb3e059622ac3534.png) [@anon28983508](https://forum.infinityfree.com/u/anon28983508)\
**Post date:** [May 14, 2022, 5:55pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/1 "2022-05-14T17:55:14Z")

</div>

Vite generates css asset files in the /assets/ folder; however when the browser tries to open these files, the server responds with an HTTP 404 Error. The asset files contain dots in their name (e.g. asset.n39d3od4.css). I quickly found out that any file containing a dot in its name generates an Server Error. Is there a way to circumvent this problem (like .htaccess) without having to rename all css link tags manually?

---

<div class="post-metadata">

**Author:** ![Oxy](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/oxy/32/37989_2.png) [@Oxy](https://forum.infinityfree.com/u/Oxy)\
**Post date:** [May 14, 2022, 6:30pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/2 "2022-05-14T18:30:49Z")

</div>

Hi and welcome to the forum

Domain/subdomain name?

---

<div class="post-metadata">

**Author:** ![anon28983508](https://forum.infinityfree.com/letter_avatar/anon28983508/32/6_22734026db12803ebb3e059622ac3534.png) [@anon28983508](https://forum.infinityfree.com/u/anon28983508)\
**Post date:** [May 14, 2022, 8:31pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/3 "2022-05-14T20:31:09Z")

</div>

It’s [https://prawin.gq/assets/asset.83nw2k40s.css](https://prawin.gq/assets/asset.83nw2k40s.css)

However strangly, now the file is working normally.

---

<div class="post-metadata">

**Author:** ![anon28983508](https://forum.infinityfree.com/letter_avatar/anon28983508/32/6_22734026db12803ebb3e059622ac3534.png) [@anon28983508](https://forum.infinityfree.com/u/anon28983508)\
**Post date:** [May 15, 2022, 3:56pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/4 "2022-05-15T15:56:25Z")

</div>

So, is there a reason why this only works sometimes?

---

<div class="post-metadata">

**Author:** ![Greenreader9](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/greenreader9/32/22847_2.png) [@Greenreader9](https://forum.infinityfree.com/u/Greenreader9)\
**Post date:** [May 15, 2022, 5:49pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/5 "2022-05-15T17:49:41Z")

</div>

My best guess:

> [@What is DNS propagation](https://forum.infinityfree.com/t/what-is-dns-propagation/49235):
>
> You’ve added a new domain name to your account, just changed your nameservers or recently modified some DNS settings. However, they aren’t working yet. You’ve discovered already that it’s not working yet because of something called “DNS Propagation”. But what does that mean? Introduction to DNS Before you can understand how DNS Propagation works, you need to understand how DNS itself works. So let’s start with that. Servers on the internet are identified by a set of numbers called an IP addres…

---

<div class="post-metadata">

**Author:** ![anon28983508](https://forum.infinityfree.com/letter_avatar/anon28983508/32/6_22734026db12803ebb3e059622ac3534.png) [@anon28983508](https://forum.infinityfree.com/u/anon28983508)\
**Post date:** [May 15, 2022, 8:31pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/6 "2022-05-15T20:31:28Z")

</div>

DNS Propagation can’t be the reason. This account with it’s domain was created back in December 2018. I have also experienced a problem where the PHP ??= operator wasn’t working for a short period of time, causing blank pages. This had to do with a temporary change of PHP version change I didn’t initiate. Are these types of problems known and when are these going to be fixed?

---

<div class="post-metadata">

**Author:** ![Greenreader9](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/greenreader9/32/22847_2.png) [@Greenreader9](https://forum.infinityfree.com/u/Greenreader9)\
**Post date:** [May 15, 2022, 8:33pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/7 "2022-05-15T20:33:04Z")

</div>

I can’t diagnose a problem that does not exist for me. Every time I have opened the file it works. Maybe the issue was caching, I have no clue, only guesses that may or may not be correct.

---

<div class="post-metadata">

**Author:** ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)\
**Post date:** [May 16, 2022, 9:21am UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/8 "2022-05-16T09:21:55Z")

</div>

It’s working fine from here:

![image](https://forum-cdn.infinityfree.net/original/3X/a/e/ae63175825fed3dd232f9b29e5500a62d101946f.png)

I don’t know what kind of server error you see. But having multiple dots in a file name is no problem on our hosting.

---

<div class="post-metadata">

**Author:** ![Oxy](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/oxy/32/37989_2.png) [@Oxy](https://forum.infinityfree.com/u/Oxy)\
**Post date:** [May 16, 2022, 9:22pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/9 "2022-05-16T21:22:30Z")

</div>

Split this topic on May 16, 2022, 9:22pm UTC

A post was split to a new topic: [Issues with the ssl](https://forum.infinityfree.com/t/issues-with-the-ssl/61658)

---

<div class="post-metadata">

**Author:** ![anon28983508](https://forum.infinityfree.com/letter_avatar/anon28983508/32/6_22734026db12803ebb3e059622ac3534.png) [@anon28983508](https://forum.infinityfree.com/u/anon28983508)\
**Post date:** [May 16, 2022, 8:37pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/10 "2022-05-16T20:37:05Z")

</div>

As you can see, on Saturday, the vite asset files caused HTTP 404 Errors (different hashes, as I tried different vite configs). But now these error are gone; so was this just a temporary bug?

 ![image](https://forum-cdn.infinityfree.net/original/3X/e/e/ee1035ee5a102ed6aebc3b6ead77e3410c326d48.jpeg)

---

<div class="post-metadata">

**Author:** ![anon28983508](https://forum.infinityfree.com/letter_avatar/anon28983508/32/6_22734026db12803ebb3e059622ac3534.png) [@anon28983508](https://forum.infinityfree.com/u/anon28983508)\
**Post date:** [May 16, 2022, 8:38pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/11 "2022-05-16T20:38:13Z")

</div>

And the situation on Thursday

 ![image](https://forum-cdn.infinityfree.net/original/3X/d/d/dd7724c2abfc86b05fbaabea74e352aa3587898b.jpeg)

---

<div class="post-metadata">

**Author:** ![Greenreader9](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/greenreader9/32/22847_2.png) [@Greenreader9](https://forum.infinityfree.com/u/Greenreader9)\
**Post date:** [May 16, 2022, 9:17pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/12 "2022-05-16T21:17:04Z")

</div>

Look at the URL being requested, its different from the one you shared with us.

prawin.gq/assets/asset.e7d69ffb.css does not exist. Make sure you have uploaded all the files.

---

<div class="post-metadata">

**Author:** ![Admin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/admin/32/36437_2.png) [@Admin](https://forum.infinityfree.com/u/Admin)\
**Post date:** [May 17, 2022, 8:23am UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/13 "2022-05-17T08:23:04Z")

</div>

Are these files generated by something (hence the hashes)? Are you sure the URLs on your pages use the correct hashes, and that all related files are uploaded?

Cloudflare and their caching may also be making things more complicated.

---

<div class="post-metadata">

**Author:** ![anon28983508](https://forum.infinityfree.com/letter_avatar/anon28983508/32/6_22734026db12803ebb3e059622ac3534.png) [@anon28983508](https://forum.infinityfree.com/u/anon28983508)\
**Post date:** [May 17, 2022, 3:43pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/14 "2022-05-17T15:43:38Z")

</div>

I’m using Astro js as a static site generator; i checked the files and the link tags and they did point to the correct files. I am using Cloudflare and itt’s caching features which worked normally with all files. So the problem might be with Cloudflare.

---

<div class="post-metadata">

**Author:** ![anon28983508](https://forum.infinityfree.com/letter_avatar/anon28983508/32/6_22734026db12803ebb3e059622ac3534.png) [@anon28983508](https://forum.infinityfree.com/u/anon28983508)\
**Post date:** [May 17, 2022, 5:12pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/15 "2022-05-17T17:12:48Z")

</div>

Now, I’ve found out what the problem is. While I was uploading my dist folder generated by Astro, a user opened the HTML page, before /assets/ folder was uploaded by my FTP Client. Cloudflare cached the 404 Error (it looks like Cloudflare doens’t update it’s .css and .js files even when there is a file modification unlike .php and .html). So in order to fix that problem, I had to purge the Cache.

---

<div class="post-metadata">

**Author:** ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)\
**Post date:** [May 24, 2022, 5:13pm UTC](https://forum.infinityfree.com/t/error-404-for-vite-css-asset-files/61549/16 "2022-05-24T17:13:25Z")

</div>

Closed on May 24, 2022, 5:13pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
