In mobile, please excuse the formatting. My company is using a structure like sitename.com/xyz since we hist several proprietary sites/portals on just the domain name. As a result our robots.txt looks like this:
Sitemap: sitename.com/xyz/sitemap_index.xml
#Allow crawlers to only index xyz, with some exclusions
User agent:#
Allow: /xyz
Disallow: /xyz/wp-admin/
Allow: /xyz/wp-admin/admin-ajax.php
Disallow: /
We did disallow: / because we haveca ton of subfolders/microsites we don’t want indexed but now a bunch of our /xyz pages aren’t indexing in Search Console. How can I modify our robots.txt file so the pages I want in the xyz subdomain index while leaving the other subfokders/paths hidden?
[ad_2]
You:
Allow: /xyz/
Disallow: /
Also the user agent should be * not #