When the code has corrupted CSS or JS files, an HTTP status code of 4xx or 5xx is returned to the search engine or browser crawler. The Not Found error (or 404 status code) indicates that the file has been deleted or relocated and cannot be located at the specified path. This happens if the file’s corresponding URL has not been modified.
The 403 status code, also known as the “Forbidden file” error, is a second common example of broken internal JS and CSS files. With this issue the crawler cannot read the JS files. During a crawl, the server has most likely shut down the crawler or its requests.
- The CSS files may have been reorganized, renamed, or removed and the external website wasn’t accessible during the crawl. To solve the problem, links to broken CSS files should be updated or removed from your pages.
- To resolve a 404 error after a JS file is deleted, try retrieving it and then updating the link on the page to point to the new location.