Blocking CSS files in robots.txt can affect your SEO Rankings

Kaushal Thakkar is the Founder and MD of Infidigit. He has developed award-winning search strategies for various organizations, ranging from large enterprise and e-commerce websites to small and medium-sized businesses. Before Infidigit, he was leading digital marketing, product, and eCommerce initiatives at Myntra (a Walmart Company), Times Group, ICICI Group, Tata Group. Being an engineer and product manager in his earlier days, he loves to hack growth for websites via technical SEO strategies. He is a speaker at various forums and a Pro bono guest lecturer on Organic Search, Digital Marketing, Analytics & eCommerce. In X @

Blocking CSS files in robots.txt can affect your SEO Rankings

Table of Contents

Witness an Increase in your ROI

Unlock higher rankings, quality traffic, and amplified conversions through tailored award-winning SEO strategies.

    0
    (0)

    Google’s John Mueller explains how blocking CSS in robots.txt can pose problems for Google in crawling your page.

    In a new video from the #AskGooglebot series, John addressed a question revolving around blocking CSS files on the CDN in the robots.txt file. The person asking the question pointed out that the Mobile Friendliness test in his Google Search Console was red (meaning the pages weren’t well-optimized). He suspected that blocking the CSS files was be the culprit behind this and was also curious whether this would affect site rankings.

    Here’s the question:

    “Mobile friendliness: when we block CSS files on the CDN through robots.txt, the report on mobile friendliness in GSC is red, would this affect the actual ranking?”

    John Mueller explained how the Googlebot has to be able to see a page in its entirety, including HTML, CSS, JS, and all other elements. This helps Google to better understand the page and verify that is mobile-friendly for the users. He went on to further explain that it is a bad practice to block CSS files in robots.txt and this may cause issues.

    Here’s John Mueller explanation in the YouTube video:

    “Yes, it can cause issues and you should avoid doing that. Being able to see a page completely helps us to better understand the page and confirm that it’s mobile-friendly.”

    Key Takeaway

    Do not use robots.txt file to block your CSS and Javascript files. This will not increase your Pagespeed scores, but it will prevent Google from validating your site as mobile-friendly. Make sure Google can crawl and index the entire page, including all of the elements.

    More videos from the #AskGooglebot series can be found on the Google Search Central YouTube channel. To keep you informed, we will make sure to drop a news article as soon as a video is released.

    To see all of the other interesting questions and answers, you can watch the entire video here:

    YouTube video

    Popular Searches

    SEO Company in USA | SEO Services | Professional SEO Services | SEO Agency | SEO Consulting Services | Ecommerce SEO Agency | SEO Audit Services | Google Penalty Recovery Services | Local SEO Company | App Store Optimization Service | Conversion Rate Optimization Services | PPC Services | Enterprise SEO Company  | On-page SEO Services  | Blog Commenting | Link Spam  | Benefits of SEO | Black Hat SEO | Website Structure | Google Sandbox | Types of Sitemaps |  Evergreen Content | Cloaking |  |  Types of Digital Marketing  |  White-Hat SEOMobile Marketing  |  Blogging Platforms  |  Content Gap Analysis  |  List of Search Engines Google Autocomplete  |  External Linking  |  URL Structure  |  Facebook Ads

    How useful was this post?

    0 / 5. 0

    Leave a Comment


    Secrets to be the first on search, right in your inbox.

    Subscribe to our newsletter and get carefully curated SEO news, articles, resources and inspiration on-the-go.

    Share this article

    John Mueller explaining whether Blocking CSS files in robots.txt can affect SEO Rankings

    Blocking CSS files in robots.txt can affect your SEO Rankings