0

I use Shopware and have two different webshops with two domains, domainA and domainB. Now, they have only one robots.txt file in the public folder for both domains.

I need to go online with domainA, but can't do this because domainB should not be found in Google, etc. I have domainA.conf and domainB.conf, how can I use two different robots.txt files? Each for one domain?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • Welcome to Stack Overflow! It would help to know what actions or code you've tried. – spamguy Oct 27 '21 at 15:51
  • Maybe the answers to this, question will help you https://stackoverflow.com/questions/26308779/nginx-different-robots-txt-for-alternate-domainhttps://stackoverflow.com/questions/26308779/nginx-different-robots-txt-for-alternate-domain since it isn't really shopware depended. – Skoenig Oct 27 '21 at 21:15
  • Does this answer your question? [Nginx: different robots.txt for alternate domain](https://stackoverflow.com/questions/26308779/nginx-different-robots-txt-for-alternate-domain) – Mark Rotteveel Oct 30 '21 at 11:38

1 Answers1

0
location /robots.txt {
    alias /var/www/html/shopware/public/robots/robots.txt;
}
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197