• Resolved rarcher30

    (@rarcher30)


    I want to noindex a large list of pages on our website from search. The bulk function is not an option as these posts have already been identified and we have a list of URLs and corresponding Post IDs.

    I want the system to ingest this large list of Post IDs (i.e. from CSV) and then use
    wpseo_robots addfilter to modify all of the posts it matches with to noindex in the meta robots HTML declaration. There is about 20K of them.

    I’m fairly sure that Yoast stores the value for setting a page to be noindex in a meta key within the wp_postmeta table. I logged into phpmyadmin and I can’t see where this is. I am expecting to see _yoast_wpseo_robots_noindex meta key but I am unable to see it.

    Is it hidden/obscured from view in phpmyadmin?

    I just want to know where the noindex boolean value is stored. Because we want to be able to write a script to set the value for 20K pages to noindex the most easiest and persistent way possible. Using the already existing WP admin UI is obviously not an option. Can it be done by leveraging the wpseo_robots addfilter and is it persistent in the database?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @rarcher30,

    Thanks for using the Yoast SEO plugin. The robots meta tag data is stored in?wp_wp_yoast_indexable where?is_robots_noindex?is?0 or 1.

    Thread Starter rarcher30

    (@rarcher30)

    Thanks. The table was actually wp_yoast_indexable. I have another question to follow up. What is the permalink hash key value being used for and how is it being generated? If we are to update values in the database, I am worried about breaking things if we are not able to preserve the permalink hash (or correctly regenerate). Where is the value for the permalink hash coming from?

    The issue is that we do not want to override on the front end (i.e. using the functions.php and wpseo_robots addfilter ). Instead we want to actually replace/overwrite the data in the table. So if we do that, there is a big concern about messing up the db table (the permalink hash and other values).

    We want to leverage the Yoast plugin to override the values set in the db by the plugin and by the UI. If we can’t do this using the plugin, we are better off going and doing it directly in the API and side-stepping the plugin altogether.

    • This reply was modified 8 months, 3 weeks ago by rarcher30.
    • This reply was modified 8 months, 3 weeks ago by rarcher30.
    Plugin Support Maybellyne

    (@maybellyne)

    Why?
    With the Yoast SEO indexables feature, the permalink column has a maximum length of 191 characters, so it may be fully indexed regardless of the MariaDB version. However, URLs can be much, much longer. The lowest limit seems to be the sitemaps protocol, which limits the?loc?property to a maximum of 2048 characters.

    How?
    The?permalink?should be changed to a?varchar( 2048 )?field. In order to still benefit from indexing we add a?permalink_hash?column which is filled with?{str_len}:{md5_hash}?of the permalink. This should be a?varchar( 191 )?field that’s indexed. A unique index is added to the?permalink_hash?column instead.

    What?
    It is used for searching the table; it’s unique, so faster results. Also, it anonymizes things like user IDs for other hashes – not this specifically. You can learn more here.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Where does Yoast store noindex options?’ is closed to new replies.