I couldn't find the exact answer for this particular issue.
A little background: I had to place robots.txt file for domain001.com in /public_html/ because for some reason I hadn't been able to verify the robots.txt file in google search console when I placed it in /public_html/domain001/.
Now domain002.com is using robots.txt file of domain001.com, although I have a separate robots.txt file for domain002.com in /public_html/domain002/.
As I've learned from similar topics here, I need to conditionally serve a different robots.txt file based on which domain has been accessed.
How can I do that? What code should I place in .htaccess?
I'm not a developer. So I would greatly appreciate if you provided more details in your answers.
Thank you for your time.
P.S. I'm using wordpress.