I'm using the following solution in .htaccess after all domain redirects and www to non-www redirection.
# Rewrite URL for robots.txt
RewriteRule ^robots.txt$ robots/%{HTTP_HOST}.txt [L]
Create a new directory in your root called robots.
Create a text file filled with the specific robots information for every domain.
- /robots/abc.com.txt
- /robots/abc.se.txt
- /robots/abc.de.txt
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…