How to manage different robot.txt for subdirectory multisite?

#207771
  • Resolved Chirag Gohil
    Rank Math free

    I have my WordPress managing subdirectory multisite. I want to have different robot.txt file for each site. How can I achieve that?

Viewing 1 replies (of 1 total)
  • Brian
    Rank Math free

    Hello,

    Thank you for contacting Rank Math today.

    Usually, the robots.txt file should be in the top directory of your web server. When web crawlers look for the /robots.txt file for URL, it strips the path component from the URL (everything from the first single slash) and puts /robots.txt in its place.

    So even if it’s a sub-directory installation, the robots.txt should be accessible from the main URL. You can read more about it on the official robotstxt.org site

    Also in Rank Math, we use the robots_txt filter to add the content, and if the Robots.txt file exists on the server then in Rank Math the option to edit the Robots.txt file gets disabled.

    We are doing this to prevent the user from overwriting the file.

    Hope this helps. Please let us know if you have any other additional 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 1 replies (of 1 total)

The ticket ‘How to manage different robot.txt for subdirectory multisite?’ is closed to new replies.