Noindex italian language

#419395
  • Resolved Giuliano Ciolino
    Rank Math free

    I fear that my bad rankings have depended on the second language, the Italian one.

    I have Translatepress free and I cannot put noindex on the Italian language. How can I do with Rank Math?

    Unfortunately Translatepress free creates duplicate titles and descriptions with both languages and this DEFINITELY sinks my rankings.

Viewing 1 replies (of 1 total)
  • Prabhat
    Rank Math agency

    Hello,

    Thank you for contacting the support.

    If you wish to noindex the Italian version of your website, please add the below filter to the website and see if it gives you the desired output:

    add_filter( 'rank_math/frontend/robots', function( $robots ) {
      $url = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
      if(strpos($url, '/it/')) {
        $robots["index"] = 'noindex';
      }
      return $robots;
    });

    Here’s how you can add the filter: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how that goes.

    Thank you.

    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 1 replies (of 1 total)

The ticket ‘Noindex italian language’ is closed to new replies.