I have 2 website which is hosted in a shared hosting.
1st website
example.com hosted in a root directory as /public_html/
2nd website
example2.com hosted in a sub-directory directory as /public_html/example_2/
I have this in example.com/robots.txt
User-agent: *
Disallow: /example_2/
sitemap: https://www.example.com/sitemap.xml
I have this in example2.com/robots.txt
User-agent: *
sitemap: https://www.example2.com/sitemap.xml
I want google to index both the website separately but do not mixed each another, what I know is if a website is submitted then google scrap whole directory, except the Disallow
one; So if I Disallow: /example_2/
will it effect example2.com
. If so then what is the best way to write robots.txt
for 2 website.
I'll be very great-full if some one can show me the right path.
robots.txt
are good and I dont have to do any thing at this point of time right? and yes as it is not my cup of coffee so I thik 5 times before adding a single drop of sugar. – Raunak Gupta Feb 16 '17 at 4:44