robots.txt blocks the site's script files
robots.txt stops Googlebot fetching JavaScript files, so Google cannot render the page the way visitors see it.
Why it matters #
Google renders pages like a browser to see their full content. Google Search Central says it does not render JavaScript from blocked files. If the scripts that build the page are blocked, Google may see a broken or empty page.
Old robots.txt files often block folders such as /wp-includes/ or /assets/ to save crawling. That made sense once, but now it hides the code the page needs.
How to fix it #
Remove the Disallow rules that cover your JavaScript and CSS files, or add Allow rules for them, for Googlebot and for *. Keep blocking only what really should not be crawled.
Test the change with the Robots.txt Checker, then check again with the JavaScript SEO Checker.
What it looks like, and fixed #
User-agent: *
Disallow: /wp-includes/
Disallow: /wp-content/plugins/
Disallow: /assets/js/
Old rules that hide the scripts Google needs to render the page.
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Scripts and styles are open; only the admin area stays blocked.
Fix it with your AI assistant #
Paste this into ChatGPT, Claude, Gemini or your coding agent. Fill in the words in [square brackets] first. It checks before it changes anything, changes only this, and tells you how to prove it worked.
Help me let Google render my pages. My site is [your website address], built with [your platform, e.g. WordPress]. A checker says robots.txt blocks Googlebot from some JavaScript files, so Google cannot render pages the way visitors see them. First, read my robots.txt (or ask me to paste it) and the script and style addresses in the source of [the page address]. Work out which group Googlebot follows and which rules block which files. Explain plainly what is blocked. Then give me the full corrected robots.txt: remove or narrow the rules that cover scripts and styles, or add Allow rules for them. Rules: back up the file first, keep every other rule and the sitemap line, keep private areas blocked, and add nothing that blocks real visitors or search engines. Give the full file and where it goes. Tell me that Search Console's URL Inspection can show resources it could not load. Finally, tell me to re-check with the URSY.com JavaScript SEO Checker at ursy.com/javascript-seo-checker/.
We find the problems, and help you fix them
- Check Run a free tool or the full audit.
- Fix it with your AI Download your AI Fix Pack and drop it into ChatGPT, Claude or Gemini. A free account is enough.
- Re-check Come back, check again, and watch each fix turn green.
Fix it on your platform #
WordPress
Edit robots.txt in your SEO plugin's robots.txt editor, or the real robots.txt file in the root folder. Remove rules for /wp-includes/, /wp-content/plugins/ and /wp-content/themes/.
Shopify
Shopify's default robots.txt does not block theme scripts. Check any custom rules in the robots.txt.liquid template.
A hand-made site
Remove Disallow rules for script and style folders, or add Allow rules for .js and .css files, for Googlebot and for *.
Check it is fixed #
Test a script address with the Robots.txt Checker, then run the JavaScript SEO Checker again: no script files should be blocked for Googlebot.
Official source #
Google Search Central: Fix Search-related JavaScript problems
Questions #
Why did people block these folders?
Years ago it was common to save crawling that way. Google now renders pages like a browser, so it needs the same files a browser does.
Will unblocking them put code in search results?
No. Google fetches scripts and styles to render the page; it does not show those files as results.
More problems in JavaScript and rendering
- Links only work with JavaScript High priority
- The words only appear after JavaScript runs High priority