{"id":23108,"date":"2022-02-12T06:00:00","date_gmt":"2022-02-12T01:00:00","guid":{"rendered":"https:\/\/mcstarters.com\/blog\/?p=23108"},"modified":"2025-07-12T19:44:26","modified_gmt":"2025-07-12T14:44:26","slug":"fix-googlebot-cannot-access-css-and-js-files-error-in-wordpress","status":"publish","type":"post","link":"https:\/\/mcstarters.com\/blog\/fix-googlebot-cannot-access-css-and-js-files-error-in-wordpress\/","title":{"rendered":"How to Fix Googlebot cannot access CSS and JS files Error in WordPress"},"content":{"rendered":"\n<p>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.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Check Robots.txt File<\/li>\n\n\n\n<li>Check WordPress Security plugin configuration<\/li>\n<\/ul>\n\n\n\n<p class=\"bg-blue\">You Might Also Like to <a href=\"https:\/\/mcstarters.com\/free-elementor-templates\/\" target=\"_blank\" data-type=\"URL\" data-id=\"https:\/\/mcstarters.com\/free-elementor-templates\/\" rel=\"noreferrer noopener\">Download Free Elementor Templates<\/a><\/p>\n\n\n\n<p class=\"bg-light step\"><strong>If <\/strong>you want to learn more about <a href=\"https:\/\/trk.elementor.com\/mcstartersblog\" target=\"_blank\" data-type=\"URL\" data-id=\"https:\/\/trk.elementor.com\/mcstartersblog\" rel=\"noreferrer noopener nofollow\">Elementor Page Builder<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"fix-googlebot-cannot-access-css-and-js-files-error-in-wordpress\">Fix Googlebot cannot access CSS and JS files Error in WordPress<\/h2>\n\n\n\n<p>Check out below step-by-step guide on how to fix Googlebot cannot access CSS and JS files Error in WordPress.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"check-robots-txt-file\">Check Robots.txt File<\/h3>\n\n\n\n<p>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.<\/p>\n\n\n\n<p class=\"bg-light\">You Might Also Like:  <a href=\"https:\/\/mcstarters.com\/blog\/create-a-robots-txt-file\/\" data-type=\"URL\" data-id=\"https:\/\/mcstarters.com\/blog\/create-a-robots-txt-file\/\" target=\"_blank\" rel=\"noreferrer noopener\">Create a Robots txt File<\/a> for Your Website<\/p>\n\n\n\n<p>For checking the robots.txt file you need to follow the below steps.<\/p>\n\n\n\n<p class=\"step\"><strong>Step 1: <\/strong>Install and activate &#8220;File Manager &#8221; plugin<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"341\" src=\"https:\/\/mcstarters.com\/blog\/wp-content\/uploads\/2022\/01\/Install-File-Manager-Plugin.webp\" alt=\"Install File Manager Plugin\" class=\"wp-image-22362\" title=\"\"><\/figure>\n\n\n\n<p class=\"step\"><strong>Step 2: <\/strong>Click on the<strong> <\/strong>robots.txt file and open it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"93\" src=\"https:\/\/mcstarters.com\/blog\/wp-content\/uploads\/2022\/01\/upload-robots.txt-file-into-root-directory.webp\" alt=\"upload-robots.txt-file-into-root-directory\" class=\"wp-image-22124\" title=\"\" srcset=\"https:\/\/mcstarters.com\/blog\/wp-content\/uploads\/2022\/01\/upload-robots.txt-file-into-root-directory.webp 1024w, https:\/\/mcstarters.com\/blog\/wp-content\/uploads\/2022\/01\/upload-robots.txt-file-into-root-directory-768x70.webp 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"step\"><strong>Step 3:<\/strong> Now see some lines of code that disallowed access to some WordPress directories.<\/p>\n\n\n\n<pre class=\"wp-block-code bg-code\"><code>User-agent: *\nDisallow: \/wp-admin\/\nDisallow: \/wp-includes\/\nDisallow: \/wp-content\/plugins\/\nDisallow: \/wp-content\/themes\/<\/code><\/pre>\n\n\n\n<p class=\"step\"><strong>Step 4:<\/strong> You need to remove below three lines and save the file. Now it looks like the below snippet.<\/p>\n\n\n\n<pre class=\"wp-block-code bg-code\"><code>User-agent: *\nDisallow: \/wp-admin\/\n<\/code><\/pre>\n\n\n\n<p class=\"step bg-light\"><strong>Note: <\/strong>If your robots.txt file is already clean and fine then check the below instructions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"disable-security-plugin\"><strong>Disable Security Plugin<\/strong><\/h3>\n\n\n\n<p>Now you need to <strong>disable the security plugin and check configuration again<\/strong> maybe the security plugin block Googlebot to access CSS and Js files. These are top security plugins. <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sucuri Security \u2013 Auditing, Malware Scanner and Security Hardening.<\/li>\n\n\n\n<li>iThemes Security.<\/li>\n\n\n\n<li>Wordfence Security.<\/li>\n\n\n\n<li>WP fail2ban.<\/li>\n\n\n\n<li>All In One WP Security &amp; Firewall.<\/li>\n\n\n\n<li>Jetpack.<\/li>\n\n\n\n<li>SecuPress.<\/li>\n\n\n\n<li>BulletProof Security.<\/li>\n<\/ul>\n\n\n\n<p>If you are using Cloudflare then also check its Cloudflare rules.<\/p>\n\n\n\n<p>We hope you fix this issue but if still you face problems then comment below, definitely we will help you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Are you facing Googlebot cannot access CSS and JS files&#8230;<\/p>\n","protected":false},"author":5,"featured_media":23359,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-23108","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/mcstarters.com\/blog\/wp-json\/wp\/v2\/posts\/23108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mcstarters.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mcstarters.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mcstarters.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/mcstarters.com\/blog\/wp-json\/wp\/v2\/comments?post=23108"}],"version-history":[{"count":1,"href":"https:\/\/mcstarters.com\/blog\/wp-json\/wp\/v2\/posts\/23108\/revisions"}],"predecessor-version":[{"id":37383,"href":"https:\/\/mcstarters.com\/blog\/wp-json\/wp\/v2\/posts\/23108\/revisions\/37383"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mcstarters.com\/blog\/wp-json\/wp\/v2\/media\/23359"}],"wp:attachment":[{"href":"https:\/\/mcstarters.com\/blog\/wp-json\/wp\/v2\/media?parent=23108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mcstarters.com\/blog\/wp-json\/wp\/v2\/categories?post=23108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mcstarters.com\/blog\/wp-json\/wp\/v2\/tags?post=23108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}