Serve a different robots.txt for every site in the same directory
-
Hello!
I have two websites https://domain1.com and https://domain2.com hosted in the same directory.
I need to conditionally serve a different robots.txt file based on which domain has been accessed. What code should I place in .htaccess to do that? Let’s say I’ve created a robots.txt file for the second domain called robots_xx.txt.
Thank you.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Serve a different robots.txt for every site in the same directory’ is closed to new replies.