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.

This topic contains 3 replies, has 2 voices.

Last updated by Marsel Nikolli 1 year, 7 months ago.

Assisted by: Marsel Nikolli.

Author Posts
October 3, 2023 at 6:46 pm #14508235

eranH-3

Tell us what you are trying to do?

redirect robots.txt

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

October 4, 2023 at 12:37 pm #14513039

Marsel Nikolli

Hi,

Thank you for contacting WPML Support.

In order to assist you I would need a bit more information related to the issue you facing.

What is the problem and what are you trying to achieve? You can attach screenshots or video/s if it's possible.

Looking forward to your reply,
Marsel

October 4, 2023 at 6:03 pm #14515277

eranH-3

Hello,

My translate site is displaying the robots.txt file from the original site, I need it to direct to another Txt file with the same name but with different content.

Original URL: hidden link

German translated URL: hidden link

The original file is on the .com but I need the .de to request another robot.txt file from my server called robots.txt but in another folder.

October 5, 2023 at 7:51 am #14517855

Marsel Nikolli

Hi,

Thank you for providing more information related to the issue you're having.

Setting up a different robots.txt file for each language would be a custom request.
You would need to filter the robots.txt for every site accordingly using the official WordPress wp_robots hook (https://developer.wordpress.org/reference/hooks/wp_robots/).

In this case, we recommend that you either hire a developer or a WPML contractor (https://wpml.org/contractors) to accomplish that, as custom coding falls out of the purpose of our WPML Support Policy.

I hope that you will find this information helpful.

Regards,
Marsel