Under normal circumstances, you should not find 404 errors on the minified or combined files created by WP Rocket. However there are a few external factors which can affect this.
In this Article
Google keeps its own cache of sites, at a URL like this:
It takes a snapshot of your site on its own schedule - their cache is not a “live” up-to-date version of your site.
However, visitors to your live site will see the correct version.
Since most people are almost never viewing the Google cached version, you don’t have to worry about it.
Disabling Combine and enabling only Minify in WP Rocket would resolve the issue because minification does not change the filename. But you should check the performance impact on your site. It’s not worth reducing performance for the sake of Google’s cache. It’s more important that your real visitors get the fastest experience.
Semrush, Rank Math, AHREF
If you are using one of these automated SEO tools, or any other tool which reports 404 errors on your combined CSS or JS files, check the following sections for possible reasons.
Multiple cache layers
If there is another layer of caching on your site which is not synchronized with WP Rocket’s it could lead to 404 errors.
WP Rocket is compatible with the following cache layers, just make sure to activate the relevant add-on:
Other cache layers may not be compatible. Here are some known cases, but there could be others:
- Cloudflare APO
- A managed host with its own cache that isn’t listed here
Check if there are conflicting browser caching rules.
Incorrect domain configuration
WP Rocket will manage the cache for the specific version of your domain, with or without the
www , as stated in your WordPress Settings → General.
For example, if your domain is listed with www, this is the version of the cache that will be purged.
If you have not set up a redirect, the non-www version will get cached but we won’t be able to purge it and if you access the incorrect version you may see old content and 404 errors.
The solution is to:
Incorrect CDN configuration
When you enter a CNAME in the CDN option, WP Rocket just rewrites your assets to whichever CNAME you entered. If this results in a 404 error, it's likely because your CDN is not configured correctly and you should check with your provider to resolve it.