3

We have an IIS site running Dotnetnuke that we took over from another group. We have added a robots.txt file to the root but it returns a 404. Actually any txt file in the root seems to return 404.

I can't seem to spot where they may have blocked this. Any suggestions?

EDIT: We have a duplciate of the site files and database setup on a clean IIS server and it works fine there, so it seems to be at the IIS level or somethign else outside of the web.config or similar.

EDIT2: Turns out it was a bug within a module that the developer had been using causing redirects for txt files to be messed up. Thanks everyone that replied.

3 Answers3

11

Another (small) possibility: did you check that the file is really robots.txt, not robots.txt.txt - as in, did you change your Windows Explorer settings?

atk
  • 237
2

Check your mime-type configuration on the problematic IIS. Could be that IIS is serving .txt files up as something abnormal which is causing your browsers to not recognize them as general text files. Mime types are available on Web Site and Virtual Directories property page on the HTTP Headers tab.

squillman
  • 38,163
2

You may also want to check that .txt files have not been associated with a specific application handler for whatever reason - In Properties under Home Directory click the Configuraton button. Check to make sure that .txt is not in the list of extensions. Also check to see if there are any Wildcard application maps (these would affect files of all extensions)

David
  • 1,293