Hey guys, I have a small problem. I have a site where I'm blocking some php files for example: example.php I have this entered in robots.txt and the page isnt being indexed but the query string versions are, like... example.php?u=4545 What do i put in my robots.txt to stop all variations of this file. Some on suggested simply /example but one would assume that would affect a directory? Please help Thanks.
Hi, User-agent: * Disallow: /example.php Code (markup): This robots.txt disallows access to: - /example.php - /example.php?u=4545 - /example.php_followed by_any_characters Jean-Luc
In Google that works, but it does not for Yahoo. Yahoo is not indexing example.php but is indexing example.php?u=222
Do you mean that Yahoo does not even respect the most basic robots.txt directives ? I can hardly believe that. Jean-Luc
Why would I lie? It respects the block in the robots.txt its blocks example.php Query strings are not in the robots.txt so why should it respect them?
Dave, The Robot Exclusion Protocol is very clear : Yahoo claims it respects this 1994 standard. Of course, you might have found a bug in Yahoo's algorithm. Jean-Luc
Blocks all query string urls : Disallow: /*?* Blocks all example.php query string urls : Disallow: /example.php?*