How to Fix Googlebot cannot access CSS and JS files Error in WordPress
Are you facing Googlebot cannot access CSS and JS files warning in Google webmaster tools account for your WordPress site? This error occurs when you try to increase WordPress security. We will help you to fix this issue with the guide of two things.
- Check Robots.txt File
- Check WordPress Security plugin configuration
You Might Also Like to Download Free Elementor Templates
If you want to learn more about Elementor Page Builder.
Fix Googlebot cannot access CSS and JS files Error in WordPress
Check out below step-by-step guide on how to fix Googlebot cannot access CSS and JS files Error in WordPress.
Check Robots.txt File
First, you need to Check Robots.txt File. Robots.txt file controls the access of Google bot. You can check this because maybe someone by accident adds snippets that block Css and Js File.
You Might Also Like: Create a Robots txt File for Your Website
For checking the robots.txt file you need to follow the below steps.
Step 1: Install and activate “File Manager ” plugin
Step 2: Click on the robots.txt file and open it.
Step 3: Now see some lines of code that disallowed access to some WordPress directories.
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /wp-content/plugins/
Disallow: /wp-content/themes/
Step 4: You need to remove below three lines and save the file. Now it looks like the below snippet.
User-agent: *
Disallow: /wp-admin/
Note: If your robots.txt file is already clean and fine then check the below instructions.
Disable Security Plugin
Now you need to disable the security plugin and check configuration again maybe the security plugin block Googlebot to access CSS and Js files. These are top security plugins.
- Sucuri Security – Auditing, Malware Scanner and Security Hardening.
- iThemes Security.
- Wordfence Security.
- WP fail2ban.
- All In One WP Security & Firewall.
- Jetpack.
- SecuPress.
- BulletProof Security.
If you are using Cloudflare then also check its Cloudflare rules.
We hope you fix this issue but if still you face problems then comment below, definitely we will help you.