• Resolved matgarro

    (@matgarro)


    Hi, i’m building a woocommerce website for my cunsumer with avada theme. Everythings is ok but in some pages woocommerce put this code line in the header <meta name=’robots’ content=’noindex, follow’ /> and so the seo is blocked. Someone know how is it possible to remove it?
    I already try to deactive all plugins, setting Yoast SEO, but this line code disappier only if I deactive woocommerce.
    Thanks so much

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support fevered – a11n

    (@fevered)

    Hey there!

    There’s a solution for this in this forum thread, can you try that out and see if it works for you? The forum thread is here: https://www.ads-software.com/support/topic/disable-noindex-on-certain-core-pages-2/

    Thread Starter matgarro

    (@matgarro)

    Hi and thanks so much for your answer…I already try that solution but didn’t work for me…The post solution is really old, maybe woocommerce with the updated some code with new version core…someone have my same problem?

    Thread Starter matgarro

    (@matgarro)

    Here the view-source https://prnt.sc/1qdtulc

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there ??

    Thank you for the screenshot!

    Could you please go to WordPress Dashboard > Settings > Reading > Search Engine Visibility, and from there uncheck/untick that checkbox to fix this?

    Cheers!

    Thread Starter matgarro

    (@matgarro)

    Hi, thanks for your answer, the box is uncheck. Infact the problem is only on some woocommerce pages. Here some examples of pages with problem:
    https://www.saporelite.com/shop/acquisto-farina-online-farine-integrali-bio-e-farine-artigianali/
    https://www.saporelite.com/shop/riso-carnaroli-integrale-e-riso-artigianale/

    Here some pages where there are no seo problems:
    https://www.saporelite.com/prodotti/cereali-biologici-e-legumi/
    https://www.saporelite.com/prodotti/pasta-artigianale/pasta-alluovo/ -> Screenshot https://prnt.sc/1qdv6xg
    Thanks for the support

    Hi @matgarro,

    Thanks for sending that over. I do wonder if there is some interaction with other items on the site. Here’s the code that WooCommerce uses to insert this code into pages.

    /**
     * Disable search engines indexing core, dynamic, cart/checkout pages.
     * Uses "wp_robots" filter introduced in WP 5.7.
     *
     * @since 5.0.0
     * @param array $robots Associative array of robots directives.
     * @return array Filtered robots directives.
     */
    function wc_page_no_robots( $robots ) {
    	if ( is_page( wc_get_page_id( 'cart' ) ) || is_page( wc_get_page_id( 'checkout' ) ) || is_page( wc_get_page_id( 'myaccount' ) ) ) {
    		return wp_robots_no_robots( $robots );
    	}
    
    	return $robots;
    }
    add_filter( 'wp_robots', 'wc_page_no_robots' );

    Essentially, this adds the “noindex” tag on the pages that are assigned to be the cart, checkout, and account pages. I’m not aware of anything in the core that would be adding this to other pages.

    Does this happen with only WooCommerce and the Storefront theme active? I’ve been trying to replicate this on my test site but so far I haven’t been able to.

    Thread Starter matgarro

    (@matgarro)

    Hi thanks so much. The problem is not in shop page, but inside some pages. This pages have got inside products with woocommerce shortcode.
    I don’t know why appened this but I need that noindex tag leave and the pages became seo on. If I put this pages inside google search consolle google test is total red with noindex segnalation.

    Hello again,

    So the “noindex” tag is added to the cart, checkout, and account pages by the snippet above. Since you’re seeing the tag on product pages, it’s coming from somewhere else.

    Does this happen with only WooCommerce and the Storefront theme active?

    I tried inserting a product shortcode into a page to see if it would trigger “noindex” but it didn’t.

    Let us know if this happens with only WooCommerce and Storefront active.

    Thanks!

    Thread Starter matgarro

    (@matgarro)

    Ho! Thanks so much for your support. Yes, the meta tag <meta name=’robots’ content=’noindex, follow’ /> is present only if woocommerce plug-in is active. If I take off the plug-in the metatag is immediately deleted.

    Just to be clear, does this happen when only WooCommerce is active with the Storefront theme. I do understand it disappears when WooCommerce is disabled but it’s not clear what else is active when you’re testing. Is it still there with only WooCommerce and Storefront active?

    Thread Starter matgarro

    (@matgarro)

    ah ok ok sorry, I didn’t understand. Yes, I did the tests with only the theme and woocommerce active, without other pougins turned on.

    Thread Starter matgarro

    (@matgarro)

    Well…I don’t know how I can fix this problem…I contacted avada Theme And Yoast developer …but both don’t know why woocommerce add noindex inside metà tag header…are there a possibility to override the noindex tag with index tag?
    Thanks so much for the support

    Plugin Support B C. a11n

    (@battouly)

    Hey @matgarro,

    Yes, I did the tests with only the theme and woocommerce active, without other pougins turned on.

    Is this to confirm in your case you are able to replicate it with WooCommerce + the storefront theme (Not avada Theme)?

    And, the following snippet did not solve it even with the Storefront theme active?

    Snippet:

    add_action( 'init', 'remove_wc_page_noindex' );
    function remove_wc_page_noindex(){
    	remove_action( 'wp_head', 'wc_page_noindex' );
    }

    If the above is correct, please provide us with an environment to test it out and troubleshoot further.

    You can contact us at WooCommerce.com > My Account > Support. You may need to create an account before you can access that page.

    Please include a link to this forum thread, so that we can keep track of what’s already been done.

    Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Remove Noindex meta tags in woocommerce pages’ is closed to new replies.