• Resolved promes

    (@promes)


    Hi,
    I need to noindex a few thousands of posts. I have tried bulk editing the DDBB changing the value of is_robots_noindex value to 1. And this solution effectively changes the html code of the affected pages by adding the noindex tag.

    The problems are:
    1) When editing the affected posts in WP backend, Yoast SEO –> Advanced –> they still have the “index this post” dropdown to true. Why does this value doesn’t get updated if the DDBB has been updated to noindex?
    2) The affected posts still appear on the sitemap, I guess because of the issue described in the first point.

    How can I make Yoast SEO the recognize that the value of is_robots_noindex has been updated and display the changes in the WP backend and sitemap?

    Thank you very much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @promes,

    Thanks for the questions. We’d like to confirm that editing the database is the only option for your specific case.

    1. Are the majority of the posts that you’re adding the noindex using the same post type? We’re asking because it’s possible to set the default to noindex under SEO > Search Appearance > Content Types or Taxonomies and then override that setting for the posts that should be indexed in the edit post screen.

    2. Is there a common category or common setting for those posts that you can use as a condition for adding the noindex? This would allow you to add code to use the Yoast SEO “wpseo_robots” filter and set the noindex dynamically for those posts. See these code examples.

    Would either of these methods mentioned above work for you instead of editing the database directly?

    Thread Starter promes

    (@promes)

    Hi @priscillamc
    Thank you very much for your quick answer ??
    There’s no common post type neither category in the posts that have to be noindexed. We have thousands of posts and deindexing a part of them is part of a content pruning strategy, so we deindex them according to multiple factors (post views, post CTR in google, content quality, etc.).
    We basically have a list of post IDs that have to be deindexed and we need to bulk insert the noindex tag.

    We will proceed editing the database. Would Yoast SEO eventually detect the database changes and update the dropdown index status in each post editing page? Or is there any other database field we could edit to update this field value? (I have been looking for hours where the dropdown indexing status may be stored in the database but I’m unable to find it).

    Thanks!

    Plugin Support Michael Ti?a

    (@mikes41720)

    Hi,

    Yoast SEO includes filters that allow you or your developer to customize many of our plugin features. These filters are documented inside the plugin code. We also have a developer portal where you can find more information about filters and even check out some examples of how to use them.

    Typically code snippets are added to your theme’s functions.php file. If you’re not familiar with using code snippets, we’d like to refer you to the WordPress documentation on how to use a filter.

    We recommend that you create the appropriate backups and test this on a staging site first, if possible. While using the filter here (in order to modify the meta robots tag to ‘noindex’), should update the drop-down box as well, however, if it doesn’t, the important thing is that the ‘noindex’ meta robots tag outputs in the page source for that post, and is also removed from the sitemap accordingly.

    Thread Starter promes

    (@promes)

    Hi @mikes41720
    Thank you very much for your detailed reply!
    We will investigate the use of filters and maybe develop some custom plugin where we could add our bulk posts to be pruned (and deindexed), as playing with the database is not an elegant and secure solution.
    Best,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Bulk editing is_robots_noindex issue’ is closed to new replies.