• Dear Sir/Madam,

    The meta robots “no-index” functionality is not working anymore.

    The pages are getting indexed even if, in the settings, the indexing of the page is explicitly disabled.

    Also, the following code:

    add_filter( 'wpseo_robots', '__return_false' );

    does not work.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @pietrolc,

    We understand that you’d like to prevent pages from being indexed. However, the example page doesn’t have a robots meta tag set to “noindex” as expected.

    1. Can you confirm that you’re using the latest version of Yoast SEO (14.5)?

    2. The code example that you’ve sent removes the Yoast robots meta tag, so this may override your settings and allow the pages to be indexed. Does removing the custom code make the robots meta tag appear? If so, what value appears for the robots meta tag?

    3. Can you let us know how you noindexed this page using the Yoast SEO interface? Did you edit the page and set “Show in search results” to “No” under the Advanced section in the Yoast SEO metabox?

    Thread Starter Pietro L. Carotenuto

    (@pietrolc)

    1. Can you confirm that you’re using the latest version of Yoast SEO (14.5)?

    Yes.

    2. The code example that you’ve sent removes the Yoast robots meta tag, so this may override your settings and allow the pages to be indexed. Does removing the custom code make the robots meta tag appear? If so, what value appears for the robots meta tag?

    From the source code of the page, you can check that no robots meta tag exists.

    The code

    add_filter( 'wpseo_robots', '__return_false' );

    is expected to add a meta robots line to not index the specific page.

    The same problem is occurring when using the approach reported in this blog to not index the page:
    https://www.satollo.net/set-noindex-on-wordpress-categories-pages-with-wordpress-seo

    3. Can you let us know how you noindexed this page using the Yoast SEO interface? Did you edit the page and set “Show in search results” to “No” under the Advanced section in the Yoast SEO metabox?

    How search engines to show this Page in search results? NO.

    Plugin Support Michael Tiña

    (@mikes41720)

    Hi,

    The custom code that you’re currently adding is removing the meta robots tag from outputting, it’s not adding a ‘noindex’ tag.

    Just to confirm, if you remove the custom code and set a post or page to noindex as per this article, it doesn’t show the ‘noindex’ tag in the page source? Could you please provide us with a sample URL?

    Thread Starter Pietro L. Carotenuto

    (@pietrolc)

    Hi,

    I checked that the method proposed in this article allows to not index many of the pages on my website, but it does not work with all pages.

    My guess is that it works if the page is mydomain.com/page1/.

    Unfortunately, it does not work for user profile pages, where the URI mydomain.com/user/ becomes mydomain.com/user/A or mydomain.com/user/B depending on visited user profile.

    My plugin has this snippet of code:

    function seo_noindex( $robots ) 
    {
         if (  conditionOK() )
         {
             return 'noindex, follow';
         }
    
         return $robots;
    }
    add_filter( 'wpseo_robots', 'seo_noindex' , 11, 1 );

    This is called once per page. The robots array in your plugin is built fine.

    Unfortunately, the meta robots are not printed at all (even if I force the page to not be indexed with the method proposed in the article).

    Plugin Support devnihil

    (@devnihil)

    @pietrolc If you want to set a user’s page to ‘noindex‘ this can be configured by going to User’s profile page settings under Users>All, choosing the ‘Edit‘ link beneath the account, and then under ‘Yoast SEO Settings‘ checking the box for ‘Do not allow search engines to show this author’s archives in search results.‘ This will set the page’s robots meta tag value to ‘noindex.

    Regarding the code you provided, we can’t offer support on custom code (needed to change (core) features of our plugin). Since we don’t want to take the risk that we break your website by suggesting incorrect or incomplete code, we cannot advise you on how to make such changes. Maybe someone watching these forums can assist you further, but if your topic is inactive for 7 days, we’ll mark it as resolved to keep the overview.

    Thank you for your understanding.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘No-index is not working anymore’ is closed to new replies.