Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 9:00 – 14:00 -
- 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 15:00 – 18:00 -

Supporter timezone: Asia/Dhaka (GMT+06:00)

This topic contains 3 replies, has 3 voices.

Last updated by Prosenjit Barman 1 year ago.

Assisted by: Prosenjit Barman.

Author Posts
April 24, 2024 at 5:07 am #15558639

edwinv-4

Hello,

I would like to noindex a language, without hiding it and loosing functionality. How is this possible? 🙂

Thanks!

April 24, 2024 at 7:09 am #15558877

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with the first debugging steps and try to help with the issue quickly.

You can manually set pages in 2nd language to no-index via an SEO plugin, for example, Yoast SEO or can adjust some custom code for example fetch language, and if the language code is DE, print in HTML header no-index snippet.

- hidden link

Hope this helps.

Regards,
Drazen

April 24, 2024 at 7:31 am #15558990

edwinv-4

Hi there,

Page-by-page is no option for us, as this requires a lot of time. We have 300+ pages. Do you have some function in WPML that we can add that does this?

Thanks!

April 24, 2024 at 11:17 am #15560344

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,

I hope you're doing well. I have taken over this ticket and would be happy to assist you further.

Since you're using the Rankmath plugin, you can select multiple pages or posts in the language you want to set to 'noindex' in bulk, and apply the 'no-index' robot meta to those pages. For more detailed instructions, please refer to the guide below.

While WPML does not have a direct setting to apply a 'noindex' meta tag for an entire language, the only possible way I can suggest is by bulk-selecting pages or posts and setting them to 'noindex'. Alternatively, you can implement a custom coding approach to automatically set 'noindex' for all content within a specific language. For example, the code below will add 'noindex' meta to the page that contains the French language code(fr):

function set_noindex_for_specific_language() {
    $current_language = apply_filters('wpml_current_language', NULL);
    if ($current_language == 'fr') {
        echo '<meta name="robots" content="noindex, follow">';
    }
}
add_action('wp_head', 'set_noindex_for_specific_language');

In this way, you can also prevent contents for a specific page from being indexed.

I hope you can understand. If there is anything else you'd like to share, feel free to let me know.

Best regards,
Prosenjit

The topic ‘[Closed] Noindex specific language without hiding it’ is closed to new replies.