When I'm checking the Google results for our site's
site:example.com, we get lots of index results like
How do I disallow this type URL, so they don't show up in the search results?
This is definitely the case when you should use meta tag "robots" and "noindex" the subdomain or what ever pages you want to hide from serps. After that, you could consider using url removal tool from google and getting rid of pages you don't want to see in serps, which will speed up the process a bit.
Do not go with robots.txt and blocking content of this type.
The correct answer to your question is to put a robots.txt file at the root folder of your subdomain or put robots meta tags on your subdomain's index page to block them from crawling and indexing.
It has very simple solution. You need to put the Robots.txt file in the root folder of your sudomain (i.e
After that you can use Robots meta tag to disallow SE from crawling your site (i.e
User-agent: * Disallow: xyz.example.com
Disallow: xyz.example.com/abc Disallow: xyz.example.com/abcd Disallow: xyz.example.com/abcde
When you have to execute your file, you allow it and you do not have to.
User-agent: * Disallow: xyz.example.com Disallow: /wp-admin/