WordPress Themes Files Blocked by robots.txt Leading to Mobile Friendly Test Failure


The tool provided by this URL: here can be used to test any given pages are user friendly or not.

I put my wordpress sites (including this one, they all have wordpress official theme 2012) to the test, and it shows “Links Too Close” and “Width Wider than Screen”. However, my friend is also using this theme, but he passed the mobility test.

Following the instructions and hints, I found out the rules in robots.txt are blocking too much which includes the CSS style sheets for WordPress themes. And that is why google bots think it is not mobile friendly. Blocking these CSS (non content files) reduces the number of unnecessary requests and therefore reducing your website bandwidth. However, passing mobile user friendly test is said to be a ranking signal, which I prefer.

User-agent: *
Disallow: /wp-
Disallow: /feed/
Disallow: /trackback/
Disallow: /comments/feed/
Disallow: /comments/
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /wp-content/plugins/
Disallow: /wp-content/cache/
Disallow: /wp-content/themes/
Disallow: /wp-login.php
Disallow: /wp-register.php

All you need to block is just these two folders:

User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/

Login to [Google Webmaster] and ask google to update the robots.txt, which they obey the rules very strictly. And retry the test, it passes the [mobile user friendly test] immediately.

–EOF (The Ultimate Computing & Technology Blog) —

GD Star Rating
loading...
283 words
Last Post: Timus 2031. Overturned Numbers - Python Solution
Next Post: How to Display an Image over Axes in Python (MathplotLib and Numpy)?

The Permanent URL is: WordPress Themes Files Blocked by robots.txt Leading to Mobile Friendly Test Failure

One Response

Leave a Reply