ugc nofollow for links in comments

#245094
  • Resolved Jesper Pallesen
    Rank Math free

    Hi,

    On our blog, all links in comments have rel=”nofollow ugc” added. I read your support post about the code to add to the theme, but I can’t get it working. Can you please tell me how I can remove this code from being added to links in comments?

    Best regards,
    Jesper

Viewing 9 replies - 1 through 9 (of 9 total)
  • Tammy
    Rank Math business

    Hello,

    Thank you for contacting Rank Math today, and we apologize for any inconvenience this may have caused.

    We employ the UGC property since the links in the comments are user-generated, according to Google’s notice. There’s no need to worry about this property now that WordPress 5.3 has included new functions to add UGC attributes to links and implements them in comments. https://developers.google.com/search/blog/2019/09/evolving-nofollow-new-ways-to-identify

    If you still want to delete the attribute, you can use the filter code below in your theme:

    add_filter( ‘rank_math/frontend/add_ugc_attribute’, ‘__return_false’ );

    I hope this information is helpful, and please do not hesitate to contact us if you require any additional support.

    Thank you.

    Hi,

    Thanks for you reply.

    Do you know where I insert this filter code? I tried to place it inside functions.php, but didn’t seem to work.

    Best regards,
    Jesper

    Hello,

    It should work inside the functions.php file. Can you please clear the cache of your site & browser and check again?

    Let us know how that goes. Looking forward to helping you.

    Thanks.

    Hi,

    I have cleared cache everywhere and checking in incognito, but the nofollow ugc is still there. Do you have an idea why this is?

    Best regards,
    Jesper

    Hello,

    This code should go into your active child theme or theme’s functions.php file.

    If it’s still not reflecting on your site upon clearing your site’s cache, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Thank you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    There was some issue with the code. The quotes were not applied correctly and stopping the code from working. I have fixed it.

    However, I am still able to see the ugc being added to the links in the comments. I checked further and it is present even when Rank Math is disabled. If there is any server-side cache then please clear it and check again. If the issue persists then some other plugin or theme is adding ugc to the links. Please follow this troubleshooting guide to figure that out: https://rankmath.com/kb/check-plugin-conflicts/

    Let us know how that goes. Looking forward to your update.

    Hi,

    Thanks a lot.

    The changes you did was just to the code your colleagues gave me earlier (add_filter( ‘rank_math/frontend/add_ugc_attribute’, ‘__return_false’ );) or did you edit any other code?

    Best regards,
    Jesper

    Hello,

    Since version 5.3 of WordPress, the ugc attribute is applied by the core functionality of WordPress on the user comments.

    So, this property on your website is coming from WordPress itself and not any plugin or theme.

    Hope this helps clarify your doubts.

    Don’t hesitate to get in touch if you have any other questions.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)

The ticket ‘ugc nofollow for links in comments’ is closed to new replies.