Google mobile friendly test fails due to W3Total Cache line added in robots.txt

I started getting warnings from GSC about some of my pages not being mobile friendly. When testing for responsiveness in my browser, everything looks good.

When running the Google Mobile Friendly Test online tool I get errors. After some digging around I found that GMFT was complaining about not being able to load my main CSS file due to a directive in my robots.txt

# BEGIN W3TC ROBOTS

User-agent: *

Disallow: /wp-content/cache/

# END W3TC ROBOTS

Notice that this section (auto-generated by W3Total Cache) disallows the /wp-content/cache/ directory, where the main CSS is.

After commenting out the disallow line, the GMFT started to report all green.

Is my solution correct? Should you block /wp-content/cache/ from crawlers? What would you guys propose for this?

submitted by /u/psd-dude
[link] [comments]

Digitalmarketing

Digital marketing agency in darbhanga

Digital marketing agency in Darbhanga digital marketing agency Local seo service in Darbhanga Best digital marketing agency in patna

0 Comments