How to allow only admin-ajax.php to be crawled?

by MovieMe   Last Updated June 13, 2019 07:04 AM

My robots.txt looks as follows:

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

Google Webmaster Tool recently raised a warning saying:

Indexed, though blocked by robots.txt

I guess the Disallow at the folder level is overwriting the file level Allow. What is the way to get around this?



Related Questions


Updated July 05, 2018 14:04 PM

Updated July 17, 2018 13:04 PM

Updated June 19, 2017 10:04 AM

Updated September 05, 2018 08:04 AM