• Resolved Roman

    (@roman17trushanov)


    Hi there!

    It would be wonderful if someone could enlighten me about the use of meta-robots for comment-urls in Yoast.

    As you can see in the source code of these example URL:

    https://www.bussgeldkatalog.org/geschwindigkeitsueberschreitung/comment-page-2/
    https://www.bussgeldkatalog.org/geschwindigkeitsueberschreitung/comment-page-3/

    two contradicting meta-robots commands are played out. The first one says “noindex”, whereas the second one from Yoast says “index”. There should be one unique meta-robots tag for these comment URLs saying “noindex, follow”.

    How can I possibly make Yoast either turn its “index, follow” meta-robots tag into a “noindex, follow” one or, even better, completely disable Yoast meta-robots only on comment URLs?

    Surfing on the web I found a code-snippet that could help me with the latter:

    add_filter( ‘wpseo_robots’, ‘yoast_seo_robots_remove_single’ );

    function yoast_seo_robots_remove_single( $robots ) {
    if ( is_single ( 123456 ) ) {
    return false;
    } else {
    return $robots;}
    }

    The problem is that I have no idea how to change “is_single ( 123456 )” into a different identifier, which includes all the comment URLs, and nothing else.

    Looking forward for any valuable hints!

    Stay positive & test negative,
    Roman

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    Thanks for reaching out here. We looked at the relevant comments pages and can confirm the noindex robots meta on them but those aren’t generated by the Yoast SEO plugin but generated by a 3rd party source. In addition, we can confirm that both of the relevant pages have noindex on them and not index.

    That said since both of the pages include the noindex robots meta, the relevant pages will disappear from search results soon. So, you won’t need to modify anything at this point unless you want to change the noindex to index.

    Thread Starter Roman

    (@roman17trushanov)

    @mazedulislamkhan

    We looked at the relevant comments pages and can confirm the noindex robots meta on them but those aren’t generated by the Yoast SEO plugin but generated by a 3rd party source.

    Well, sure, we put a “noindex” tag on the comment pages since we want them to disappear from the index.

    In addition, we can confirm that both of the relevant pages have noindex on them and not index.

    That′s technically not correct, since there are both “noindex” from our developers and “index” from Yoast.

    So, you won’t need to modify anything at this point.

    A respectable SEO-agency pointed out that we should remove the contradiction between “noindex” and “index”, which makes totally sense. Contradictory meta-robots commands can confuse googlebot.

    In short, the issue is still pending. I would highly appreciate any hint. Does anyone have any suggestion? ??

    • This reply was modified 3 years, 8 months ago by Roman.
    • This reply was modified 3 years, 8 months ago by Roman.
    • This reply was modified 3 years, 8 months ago by Roman.
    • This reply was modified 3 years, 8 months ago by Roman.
    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    Thanks for your confirmation. You’re right, we missed the point that Yoast SEO is still outputting the index,follow but you have already defined noindex on them. So, having both noindex and index on the same pages will confuse search engines.

    That said, can you please confirm what types of pages are those comment-page? Are these pages generated by custom post types or something else?

    Thread Starter Roman

    (@roman17trushanov)

    Sorry @mazedulislamkhan , I felt baffled in the beginning, but I appreciate that we are on the same page now ??

    Can you please confirm what types of pages are those comment-page? Are these pages generated by custom post types or something else?

    These pages are generated through Settings -> Discussion -> Other comment settings -> Break comments into pages with XXXX top level comments per page and the first/last page displayed by default.

    They are no custom post types, but, so to speak, WP-pages, generated via the standard WP-functionality (no plugins, no 3rd party or custom code).

    • This reply was modified 3 years, 8 months ago by Roman.
    • This reply was modified 3 years, 8 months ago by Roman.
    • This reply was modified 3 years, 8 months ago by Roman.
    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    Thanks for your confirmation. We can confirm that Yoast SEO automatically adds the canonical URL pointing to the relevant page when the break comments into pages with option is enabled.

    We looked at the relevant page again and can confirm that Yoast SEO is adding the following canonical URL:

    <link rel="canonical" href="https://www.bussgeldkatalog.org/geschwindigkeitsueberschreitung/" />

    This will “hint” that search engines should canonicalize back to the post root, but, will still allow indexing a specific comments view if it thinks that’s valuable enough.

    We know that you don’t wish search engines to crawl and index the relevant comments pages at all. In this case, you can simply disable the paginated comments view and that’s what we recommend. So, you won’t need to manually add the noindex, nor you’ll need to remove the index robots meta generated by Yoast SEO plugin on the relevant pages.

    We hope this helps now!

    Thread Starter Roman

    (@roman17trushanov)

    Hello again,

    In this case, you can simply disable the paginated comments view and that’s what we recommend.

    Are you suggesting me to completely disable the paginated comments pages? If that′s the case, unfortunately, we cannot afford to do this for SEO-reasons. The paginated comment pages prevent our top-URLs from being semantically diluted by a shitload of comments.

    I am wondering how can I apply this code snippet

    add_filter( ‘wpseo_robots’, ‘__return_false’ );

    ONLY to paginated comments page.

    That should do the job, but I′m lacking a robust PHP knowledge.

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    As much as we hate to say it, your question goes beyond the technical expertise of me and my colleagues on the Yoast support team. This means we can’t give you a solid answer to your question.

    But we don’t want to leave you empty-handed either, that’s why we’ve created our developer portal at developer.yoast.com. This has proven to be useful to many developers in the past, and hopefully will serve you well too.

    Sorry we can’t be of more help here.

    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 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to adjust (or disable) Meta-Robots for Comment-URLs?’ is closed to new replies.