3

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

Please find here the link to the website.

Any insights?

1
  • 3
    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 '21 at 15:13
0

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.mywebsite.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.

1
  • 2
    Why would type="text/css" in the stylesheet link cause problems? Dec 3 '21 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy