Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are using WPML with WooCommerce Multilingual and have noticed that translated WooCommerce product category slugs are redirected with a 302 status code instead of a 301 on separate domains per language/country. You are concerned about the SEO implications and whether it is safe to change these redirects to 301.
Solution:
We have confirmed that changing these specific WooCommerce product category redirects from 302 to 301 will not affect WPML's language negotiation, hreflang tags, canonical URLs, language switchers, or WooCommerce Multilingual functionality. It is safe to use a 301 (permanent) redirect for permanently changed category URLs to help search engines recognize them as such. Currently, there is no setting in WPML to automatically change these redirects to 301, but you can implement a custom solution using a PHP snippet. If you have an alternative PHP snippet that uses the

wp_redirect_status

filter, feel free to share it with us for review.

Please note that this solution might be irrelevant if it's outdated or not applicable to your specific case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If this does not resolve your issue, please open a new support ticket at WPML support forum.

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.

This topic contains 15 replies, has 1 voice.

Last updated by lobkeB 3 weeks, 6 days ago.

Assisted by: Paola Mendiburu.

Author Posts
June 15, 2026 at 9:25 am #18103393

Paola Mendiburu
WPML Supporter since 11/2020

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

Hi Lobke,

This is Paola and I will continue with the ticket as Carlos is off.

I discussed this with our Second Tier team. At the moment, there are no plans to change this behavior so that these category slug redirects use a 301 status code by default.

The main reason is that this appears to be a very specific edge case. We do not know the exact sequence of events that led Google to index URLs that no longer exist, especially considering that these URLs are not present in the sitemap and do not appear to be linked from the site. As Google continues to recrawl and reindex the website, those obsolete URLs should gradually disappear from its index, making the distinction between a 301 and a 302 redirect largely irrelevant in the long term.

Regarding a custom solution, we previously shared a code snippet that should achieve the behavior you are looking for. However, if you have an alternative PHP snippet that uses the wp_redirect_status filter, please feel free to share it with us. We will be happy to review it and confirm whether it is safely scoped for this specific use case.

June 15, 2026 at 10:03 am #18103482

lobkeB

Hi Carlos and Paola,

We reviewed the proposed code, but it does not seem to solve our specific issue because it only changes 302 redirects to 301 when the target URL is on a different host.
In our case, the old and new category URLs are usually on the same host, so the redirects would most likely remain 302.
For example:

hidden link
to
hidden link

We are also concerned that the code is quite broad and could unintentionally affect other redirects.
Since the incorrect URLs have now disappeared from the XML sitemap source code, we are considering not adding any custom code for now and simply monitoring whether Google drops these old URLs over time.

Thanks a lot for your attention to this issue!

Kind regards,
Lobke