Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Blocking directory index pages via htaccess


phranque - 7:06 am on Oct 4, 2012 (gmt 0)


One, is adding Options -Indexes to .htaccess the best way to deal with these URLs or is there a better option such as somehow causing the URLs to return 404 instead of 403 status codes?

Two, if I leave these URLs as returning 403 status codes, will the Access Denied errors go away within Google webmaster tools?


Options -Indexes is a good idea in any case.

since those directories were already indexed it would probably be better to send a 410 Gone response instead of a 403 Forbidden status code.
you can do that in .htaccess using mad-rewrite and the [G] flag

google often requests previously indexed urls for a long time, so as long as you are forbidding those requests GWT is likely to report them as access denied.
an "error" as reported in GWT is not necessarily a bad thing unless you didn't want that "error" to happen.


Thread source:: http://www.webmasterworld.com/apache/4503794.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com