How do I tell Google I've fixed mobility issues?

Home Forums Web Hosting Forum How do I tell Google I've fixed mobility issues?

This topic contains 1 reply, has 2 voices, and was last updated by  Keith Taylor 4 years ago.

  • Author
    Posts
  • #2572

    Anna
    Participant
    Ŧollars: Ŧ 41.85



    In Google Search Console – Mobile Usability, there are lots of issues dated last month. It turns out I needed to change my theme for something more mobile-friendly. I had three errors for lots of pages:

    • Touch elements too close
    • Viewport not configured
    • Small font size

    I’ve changed the theme, and now Google’s Mobile-Friendly Test tool says: “Awesome! This page is mobile-friendly.”

    However, it also reports “3 resources which are blocked by robots.txt.” These are:

    • /wp-content/plugins/bbpress/templates/default/css/bbpress.css?ver=2.5.8-5815
    • /wp-content/plugins/mycred/assets/css/widget.css?ver=1.6.3.1
    • /wp-content/plugins/bbpress/templates/default/js/editor.js?ver=2.5.8-5815

    The links are still showing as Mobile Usability issues in Google’s Search Console. Is this because of the blocked resources, or something else?

    I’m a bit confused because in the Google Index section of Search Console there’s a page for Blocked Resources. When I go ther, it says: “No blocked resources detected. Be sure to check all site variants.”

    I’m not sure what I should be doing to make sure my website is indexed properly by Google.

  • #2588

    Keith Taylor
    Keymaster
    Ŧollars: Ŧ 1 ,190.66

    Sometimes it seems that the Googlebots are programmed to confuse us!

    The thing to remember is that there are 2 different ways that Google reports information in Search Console:

    1. Information it gathers as the bots crawl our websites for content to index
    2. Information it provides on demand when we ask for it

    There is sometimes a disconnect between these different sources of data. Sometimes, we just have to wait for Google to catch up. In your case, we can do something about it.

    First, the Mobile Usability issues in Google’s Search Console, are collected during the googlebot crawl. The test tool confirms that you have dealt with these. Eventually, they will go from the list of issues, as they get crawled again. You can ask Google to give more priority to these, but before we do that, it’s best to deal with the blocked resources.

    In many cases, blocked resources don’t make a big difference to how a page appears, but they might. We want Google to have confidence that our pages render correctly, and as seen by their search robots.

    The blocking comes from your robots.txt file. If you’ve followed my advice, you’ve created the custom robots.txt file using the functions.php code that is commonly used. By default, this is fairly simple, and often needs tweaking for your specific site requirements.

    In your case, some plugin resources are hidden from googlebots. We can easily allow them in. Change the Snippet, or the cde in your functions.php to:

    remove_action( 'do_robots','do_robots');
    add_action( 'do_robots', 'custom_do_robots' );
    function custom_do_robots() {
    	header( 'Content-Type: text/plain; charset=utf-8' );
    
    	do_action( 'do_robotstxt' );
    
    	$output = "User-agent: *\n";
    	$public = get_option( 'blog_public' );
    	if ( '0' == $public ) {
    		$output .= "Disallow: /\n";
    	} else {
    		$site_url = parse_url( site_url() );
    		$path = ( !empty( $site_url['path'] ) ) ? $site_url['path'] : '';
    		$output .= "Disallow: $path/xmlrpc.php\n";
    		$output .= "Disallow: $path/wp-admin/\n";
    		$output .= "Disallow: $path/wp-includes/\n";
    		$output .= "Allow: $path/wp-includes/js/\n";
    		$output .= "Allow: $path/wp-includes/css/\n";
    		$output .= "Disallow: $path/wp-content/plugins/\n";
    		$output .= "Allow: $path/wp-content/plugins/bbpress/templates/default/css/\n";
    		$output .= "Allow: $path/wp-content/plugins/bbpress/templates/default/js/\n";
    		$output .= "Allow: $path/wp-content/plugins/mycred/assets/css/\n";
    		$output .= "Allow: $path/wp-content/plugins/wordpress-seo/css/\n";
    	}
    	echo apply_filters('robots_txt', $output, $public);
    }
    

    Be careful to keep any existing lines that are currently allowing or disallowing on your website.

    After changing that, retest with Google’s Mobile-Friendly Test tool. If resorces are no longer blocked, you can decide if you want to urge Google to clear the pages from Mobile Usability issues in Google’s Search Console.

    If you do, open the Fetch as Google option in the Crawl section of Google Search Console. Enter the URL for the page concerned, and change the Desktop dropdown to Mobile:Smartphone, then click Fetch. Once the ‘Submit to index’ button occurs, click it and choose ‘Crawl only this URL’

    The reason that the Blocked Resources says: “No blocked resources detected. Be sure to check all site variants.” is just a timing delay from the Google crawl. Eventually, if you did not change your robots.txt then the warnings would show in a list on that page.

You must be logged in to reply to this topic.