Robots.txt for WordPress

[ad_1]

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]
1 Comment

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer