Forum Moderators: phranque

Message Too Old, No Replies

"403 Forbidden" Getting a lot of this in my server logs

Should I be worried

         

uk_webber

8:08 am on Aug 8, 2005 (gmt 0)



Hi, I am getting an awful lot of '403 Forbidden' errors showing up in my logs and was wondering

a) why this might be
b) is it doing my site any harm
c) what can I do about it

thanks guys...

John Carpenter

11:51 pm on Aug 8, 2005 (gmt 0)

10+ Year Member



c) what can I do about it

You need to inspect your logs. Look at the URI of the 403-requests. Someone could be for example trying to access a folder on your site that contains no index, etc. It may be anything.

travelin cat

10:46 pm on Aug 10, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



uk_webber,

There really is not much you can do when people are looking for pages that do not exist.

That being said, you should have a custom page (call it something like not_found.html) for not found pages that says something similiar to this:

"The page you are looking for no longer exists.
Please click on one of the links above to continue."

Make the page look like the rest of your site (headers, footers etc.)
and add this to you .htaccess file:

ErrorDocument 404 [yoursite.com...]

This will cause not_found.html to show up in the browser instead of the ugly 404 NOT FOUND standard stuff...

jdMorgan

11:50 pm on Aug 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



and add this to you .htaccess file:

ErrorDocument 404 [yoursite.com...]


Doing so will cause all missing pages to return a 302-Found server header, as described in the ErrorDocument documentation [httpd.apache.org]. Instead, specify a local URL-path, using:

ErrorDocument 404 /not_found.html

This will return the proper 404 status. (Using a URL with a method, such as "http:" requires the server to do a redirect, which is why it will issue a 302 instead of a 404.)

However, the subject of this thread pertains to 403-Forbidden errors, so you may also want to declare a custom 403 error page using:


ErrorDocument 403 /forbidden.html

Neither of these will help to identify the root cause of the problem, they just give you an opportunity to offer a more "user-friendly" error page. To find the root cause of the problem, inspect your access and error logs, as John Carpenter suggested.

Jim

travelin cat

4:11 pm on Aug 11, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



oops. Sorry about that... guess I need more coffee to tell the difference between the numbers 403 and 404

thanks also for the tip on the 404 status...