5

When rendering my website in Mobile-Friendly Test, I saw that my sites' CSS + Images are blocked.

See This Screenshot

See This Screenshot

The site is built on Elementor, there isn't a cache plugin. I disabled all plugins and it's still the same.

This is my robots.txt file:

User-agent: *
Disallow: 
Allow: /wp-admin/admin-ajax.php
Allow: .js 
Allow: .css

sitemap: https://www.carxpress.co.il/sitemap_index.xml

Any insights?

2
  • 5
    You don't need any of the Allow: lines in your robots.txt because you don't disallow anything. I'd also expect wildcards in a couple of the lines like Allow: *.js if you actually needed them to allow your JavaScript files. Dec 3, 2021 at 15:13
  • Are you sure that a plugin for your browser is not stopping them ? Aug 1, 2022 at 1:47

1 Answer 1

1

To fix the Mobile-Friendly Test CSS issues you can remove the type="text/css" from the CSS head tags and only keep something like this:

<link rel="stylesheet" href="https://www.example.com/styles.css">.

Image errors are more because of this tool is time-specific while Google doesn't have a time limit. Many of the resources Google uses from its own cache while this tool fetches each resource from a fresh start. So you don't have to worry about it.

Also, if you have a lazy-loading for your images you can try to disable it.

2
  • 2
    Why would type="text/css" in the stylesheet link cause problems? Dec 3, 2021 at 15:14
  • @mora Fe - Which tool are we talking about ? And what makes you think that Google will wait endlessly? Feb 1, 2023 at 3:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.