robots.txt blocks CSS or JavaScript
Short answer
robots.txt blocks CSS or JavaScript means: google needs the site's CSS and JavaScript to render pages; robots.txt blocks some of them. To fix it: remove the rules that block .css and .js files (often Disallow: /wp-includes/ or /assets/).
By the SmooxSEO team. Updated on 16 November 2026.
What it means and why it matters
Google needs the site's CSS and JavaScript to render pages; robots.txt blocks some of them.
How to fix it
Remove the rules that block .css and .js files (often Disallow: /wp-includes/ or /assets/).
Common causes
- Old advice to block /wp-includes/, /assets/ or /js/ folders in robots.txt.
- Rules that block a CDN path or build folder holding your CSS and JavaScript.
How to spot it
Read your robots.txt for Disallow rules on folders with .css or .js files. Google's URL Inspection tool, under "Page resources", lists files it couldn't load. SmooxSEO tests your pages' CSS and JavaScript files against robots.txt.
Example
User-agent: *
Disallow: /assets/User-agent: *
Disallow: /admin/Mistakes to avoid
- Blocking files to "save crawl budget": Google needs them to render the page and judge mobile-friendliness.
How serious is it?
The page still ranks, but less well, or a real opportunity is lost. Fix it when you can.
About robots.txt checks
The robots.txt file tells crawlers which parts of the site they may visit. A wrong rule can hide a whole site from search engines.
Find this problem on your site
SmooxSEO checks your whole site for this problem and 311 others, lists the details, and tells you what to fix first.