The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

404 httpd header returns 200 ok

Discussion in 'General Discussion' started by Haloweb, Nov 5, 2005.

  1. Haloweb

    Haloweb Well-Known Member

    Joined:
    Jul 2, 2004
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Hi there

    I was busy with google sitemaps, tried to verify them and get the following error regarding
    my server

    "We've detected that your 404 (file not found) error page returns a status of 200 (OK) in the header."

    does anyone have a idea how to correct this ?

    thanks for your help in advance
     
  2. Haloweb

    Haloweb Well-Known Member

    Joined:
    Jul 2, 2004
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Please , anyone have a suggestion on this
     
  3. forlinuxsupport

    forlinuxsupport Well-Known Member
    PartnerNOC

    Joined:
    Dec 22, 2004
    Messages:
    386
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    hi

    isnt it saying you have a proper error page and it works ?

    so your browser wont give a 404 error, it will give you the propper page you created.

    i think that is a good thing !!

    :)
    ANDY
     
  4. Haloweb

    Haloweb Well-Known Member

    Joined:
    Jul 2, 2004
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Thanks Andy

    But google actually needs it to give a 404 instead of 200 ok , its a requirement for google sitemaps which I have trying to work with for thier verification process
     
  5. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    Google gobbledygook! :rolleyes:

    The file you have is probably named 404.shtml which when you call it from your browser it will always give a 200 ok in the header. There is no way of altering that. It is perfectly normal. The file is presented to a browser that calls a file that does not exist.

    Try and rename the file to anything you like so you don't have a 404.shtml file and see if Google gives you a '404 file not found error' in the header instead of '200 OK'. That is also very normal.

    So I don't know what google expects unless they are reinventing the html language and the html error codes. Of course, one should expect anything from Google :rolleyes:
    :)
     
    #5 Izzee, Dec 9, 2005
    Last edited: Dec 9, 2005
  6. Haloweb

    Haloweb Well-Known Member

    Joined:
    Jul 2, 2004
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    hehe :)

    well I had actually removed the shtml file totally but was still getting the
    same error from google, perhaps they are changing html after all hehe ;)

    I just thought there was somthing in the httpd.conf I was missing.

    Thanks for your replies
     
  7. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    That's good you removed it or them if you have more than the 404 server side error pages. They should not be included in a site map period. Perhaps thats what balked Google or perhaps they don't clear their browser cache :D

    I would like to add here that Google bots will sniff every directory and file in your domain as it has no way of knowing what not to sniff unless you tell it.

    So in your site map you put all the files that are for public consumption so the Google site map brain dead bot will know what to sniff.

    Conversely those files (including your html error code files) and the directories you don't want in the public arena should be included in the robots exclusion file, robots.txt, so that Google's other brain dead bot will know to leave them alone.

    Betwixt them both and I am sure they will compare notes, the bots will have it the way you want it and not the way they and Google want it. This applies to all the good guy bots that use the robots.txt file.
    :)
     
    #7 Izzee, Dec 9, 2005
    Last edited: Dec 9, 2005
Loading...

Share This Page