How to Fix “Issues With Broken Internal JavaScript and CSS Files”?

Category:

Table of Contents

Running into issues with broken internal JavaScript and CSS files during your SEMrush site audit can be a bit of a headache. These errors can slow down your website, mess with the way it looks or functions, and even affect your SEO. 

Semrush audit Issues with broken internal JavaScript and CSS files

Why is it important? Search engines, like Google, love websites that work well and load quickly. If your JavaScript and CSS files are broken, it can slow down your site, and search engines might rank it lower in search results. Sometimes, small issues with broken files can turn into big problems if they’re not fixed. They can cause other parts of your site to break, lead to security vulnerabilities, or even make your entire site go down. 

How to fix: “Issues with broken internal JavaScript and CSS files” 

First things first, let’s understand what the issue is. JavaScript and CSS files are crucial for your website. They control everything from the design (like colors and layout) to interactive elements (like forms and animations). When SEMrush flags these files as broken, it means they’re either missing, inaccessible, or not loading correctly. This can be due to different typos in the file names, incorrect file paths, or server issues.

1) Identify the Broken Files

Step 1: Identify the Broken Files

After running your audit on SEMrush, you’ll get a report detailing the issues on your site. Look for the section highlighting broken internal JavaScript and CSS files. Make a list of these files; you’ll need it to check each one.

2) Check the File Paths

Go through the list of broken files and check their paths. Often, the problem is just a typo in the file name or an incorrect path. Make sure the file names and paths exactly match what’s on your server. Also, check for case sensitivity, as some servers differentiate between uppercase and lowercase letters.

3) Ensure Files Are Accessible

Sometimes files are correctly named and placed, but server settings or permissions prevent them from being accessed. Check your server’s settings to make sure there’s no restriction on these files. If you’re unsure how to do this, reaching out to your hosting provider can be a big help; they can guide you through the process or even fix the issue for you.

4) Verify That Files Are Not Deleted or Moved

It’s possible that the files in question were accidentally deleted or moved to a different directory. You need to view all the CSS and JS files that are loaded on a webpage. Double-check your server or source code repository to ensure the files are where they’re supposed to be. If they’re missing, you’ll need to restore them from a backup or recreate them.

5) Test Your Website

After you’ve made the necessary fixes, it’s important to test your website. Clear your browser’s cache and visit the pages that were affected. Everything should load correctly now, without any missing styles or functionalities. If everything looks good, you’re almost done.

6) Re-run the SEMrush Audit

Finally, go back to SEMrush and run another audit on your site. This will confirm whether all issues with broken internal JavaScript and CSS files have been resolved. Ideally, those errors should no longer appear in your report.


In simple terms, fixing broken JavaScript and CSS files keeps your site looking good, working well, and ensures people can find you. It’s a bit of work, but it’s totally worth it for a smooth-running, successful website. If you’re looking to take your site’s performance to the next level, consider our comprehensive SEO services. Our team specializes in technical optimization, keyword research, and other essential strategies to enhance your online presence and drive more traffic to your site.

Share a post

Ask for a
Manual SEO Audit (Limited time free)

Can also be helpful: