• Resolved heesea

    (@heesea)


    Hello!

    I have had some problems after updating to the latest versions. I currently have 4.09.

    Google Search Console has new coverage issues: “Indexed, though blocked by robots.txt”, and it has 47 pages as examples, all of which are wp-admin or backend urls.

    Some are as follows:
    https://xxx.com/wp-admin/admin.php?page=aioseo&notifications=true
    https://xxx.com/wp-admin/admin.php?page=aioseo-social-networks

    and the list goes on. I assume it has to do with your plugin’s robot.txt pages. Google Search Console robots.txt checker says there are no errors, and I do have the following regular wordpress lines in my robots.txt that instruct search engines not to index wp-admin urls:

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

    Is there a problem with this? I read that other users are having difficulties with robots.txt issues.

    I have also had weird issues where my pages that are published and showing in dashboard sometimes throw 404 errors. After resaving the page, they reappear. Can you please let me know what’s happening?

    Another issue is that certain post types that I have selected NOT to use meta data, such as my content blocks that I publish only to pull as blocks into other pages, have meta titles and descriptions. I fear that might be considered duplicate content, and also that the posts are far too small to be considered posts on their own. (They are from the Loomisoft Content Blocks plugin). These posts, along with others like Pods, are NOT selected (I have only Posts and Pages selected) but they show up with AIOSEO fields.

    This is about the free version. Although I did have the pro version for years, I had to move back to free while troubleshooting.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @heesea,

    This is intended behaviour of the robots.txt file as you do not want your /wp-admin/ pages to be indexed for security reasons. Do you have any idea how Google is finding those? You definitely don’t want those to be included in your sitemap for example.

    As for the 404 errors, does the issue go away after you deactivate AIOSEO?

    To disable SEO for those post types, you’ll now have to hook into one of our filters. You can add the code snippet below to your theme’s functions.php file in order to do this –

    add_filter( 'aioseo_disable', 'aioseo_disable_loomisoft' );
    
    function aioseo_disable_loomisoft( $disabled ) {
    	$disabledPostTypes = array(
    		'postType1',
    		'postType2'
    	);
    
    	if ( is_singular() ) {
    		$post = get_post();
    		if ( is_object( $post ) && in_array( $post->post_type, $disabledPostTypes, true ) ) {
    			return true;
    		}
    	}
    
    	return $disabled;
    }

    The only thing you’d have to do is replace postType1 (and postType2 and so on) with the slug of the post types you’d like to disable meta data for.

    If you don’t know what their slug is, then you can easily find this by going to the Sitemaps menu of All in One SEO, scrolling down to the setting that allows you to select the post types you want to include, and hovering over the icons next to them. You’ll see a tooltip that shows you the slug.

    – Arnaud

    Thread Starter heesea

    (@heesea)

    Hello, and thank you for your response!

    I do realize that wp-admin links should be blocked and shouldn’t be indexed. However, these messages showed up after upgrading the AIOSEO plugin to the 4 version. I have been online for 20 years and have never received such a message that wp-admin links (a lot of them) were being indexed but blocked, so I assumed it was the result of this plugin upgrade? The only sitemap I use is through this plugin.

    I put in the code you provided in a custom functions plugin to avoid having to change my theme’s function page that I don’t want to touch. It didn’t work, unfortunately. Does it absolutely have to be in the theme’s function? Is it at all possible to be able to exclude some post types in the regular way in a future update? I never had this problem before the upgrade. I had only posts and pages selected in the options, and that worked just fine.

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @heesea,

    It’s definitely not a result of the update.

    As far as the other issue goes, we’ll definitely consider adding back a visual option to exclude certain post types, although I personally can’t make any promises right now.

    Here’s a code snippet that should work (tested it myself):

    add_filter( 'aioseo_disable', 'aioseo_disable_loomisoft' );
    
    function aioseo_disable_loomisoft( $disabled ) {
    	if ( is_singular( 'lscontentblock' ) ) {
    		return true;
    	}
    
    	return $disabled;
    }

    – Arnaud

    Thread Starter heesea

    (@heesea)

    Thank you so much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Google Search Console Errors’ is closed to new replies.