Robots.txt - Disallowing files with no extension

Status
Not open for further replies.


I tested the line at google webmaster tools against domain.com/file and it didn't block it. Also:

domain.com/ -Allowed
domain.com/.file -Allowed
domain.com/file. - Blocked (I think this is the specific pattern the line is trying to match)

If you have filenames with no dot, I'm not sure what you would need to do to distinguish a file from a directory.
 
o Ya. New Wildcards and robots.txt files. Always an exciting combo.

If this is a high value site and you have time might want to try with some less valuable domain. But might have to take time to upload strange files and have them indexed.
 
You'd probably have more luck with adding a mod_rewrite rule that adds the X-robots HTTP header to any requests for files without an extension. I don't believe regular expressions are universally accepted in robots.txt.
 
Status
Not open for further replies.