1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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

Discussion in 'Google Sitemaps' started by dturnbull, Mar 18, 2006.

  1. #1
    I get this error when trying to verify my sitemap.
    We've detected that your 404 (file not found) error page returns a status of 200 (OK) in the header.
    SEMrush
    I searched digital point, but I have no idea what the hell anyone is going on about in the other threads. I'm using WordPress, so can someone walk me through it please?
     
    dturnbull, Mar 18, 2006 IP
    SEMrush
  2. hpotamus

    hpotamus Peon

    Messages:
    149
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    It means that you have a custom error page, which is displayed with OK status.

    http://codex.wordpress.org/Creating_an_Error_404_Page

    Sending Proper Headers

    By default, WordPress continues to send 404 pages as if they were fine. To make search engines like Google spider these pages correctly, you can add this line to the top of your theme's 404.php file.

    <?php header("HTTP/1.1 404 Not Found"); ?>
     
    hpotamus, Mar 18, 2006 IP
  3. dturnbull

    dturnbull Guest

    Messages:
    869
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #3
    that did absolutely nothing.
     
    dturnbull, Mar 19, 2006 IP
  4. jaymcc

    jaymcc Peon

    Messages:
    139
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi

    Have a look at how your 404 page is configured. Go to your site settings in your control panel/server and tell us what is set as your 404 error page.

    J
     
    jaymcc, Mar 19, 2006 IP
  5. corinaw

    corinaw Not Banned

    Messages:
    486
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'm hosted on godaddy, and do not have access to those controls. I actually notified them of this error, which common sense should tell you would be an issue, and those morons called me a moron (basically!)

    "Unfortunately as the issue you've presented is with how sites hosted with us interact with third party programs we can not provide technical support"

    So, anyway, if you have asp, add the following code ABOVE the #1 line doc type. Then you'll need to change the error page to whatever.asp, then fix the error page name to whatever.asp on your hosting cp.

    I'm fairly certain something like this is available for php, do a search for "php server response status" and I'm sure you'll find something to fix this IF you have a cruddy hosting company such as I do.


    <%
    dim pageRequested
    with request
    pageRequested = _
    mid(.queryString, instr(.queryString,";") + 1)
    end with
    response.status = "404 Not Found"
    %>
     
    corinaw, Mar 23, 2006 IP
  6. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,127
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You might also try
    <%
    Response.Status = 404
    %>
    Code (markup):
    if it is an ASP page.
     
    Corey Bryant, Mar 24, 2006 IP
  7. brainmass

    brainmass Peon

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    If you are using Apache and generating a pretty error page using htaccess or config file, make sure the link to your error page is not URL but relative link

    ErrorDocument 404 http://www.domain.com/error/404.php <- bad, no 404 error code returned

    ErrorDocument 404 /error/404.php <- good, pretty page and 404 returned



    Edit:

    Oops I guess you're not a techy person ..the only way to fix this problem is to do it with backend coding or modify the server configuration. Contact your hosting company to resolve this.
     
    brainmass, Mar 24, 2006 IP
  8. DanNicol

    DanNicol Guest

    Messages:
    33
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    i was told by my host site5 that this occurs when you have mod_rewrite on your pages
     
    DanNicol, Apr 1, 2006 IP
  9. softplus

    softplus Peon

    Messages:
    79
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #9
    That has no influence at all. If your "file not found" page does not return 404 then it's broken. You can check it here http://gsitecrawler.com/tools/Server-Status.aspx (just check any non-existant page on your server). Of course some hosters still haven't noticed that you can use result code 404 on custom error pages :D
     
    softplus, Apr 3, 2006 IP
  10. BlueDevilMedia

    BlueDevilMedia Well-Known Member

    Messages:
    1,913
    Likes Received:
    87
    Best Answers:
    0
    Trophy Points:
    190
    #10
    GoDaddy's custom error pages produce this error. You can change the error page, found within your GoDaddy Hosting Account settings, and that will clear up your problem.

    The coding mentioned earlier will also work if you want to continue using a custom error page.
     
    BlueDevilMedia, Apr 3, 2006 IP
  11. webnewbie20

    webnewbie20 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Which page should you change it too? Thankks
     
    webnewbie20, Apr 4, 2006 IP
  12. softplus

    softplus Peon

    Messages:
    79
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #12
    If you're hosting on a windows server, create an error page with asp (eg "error404.asp") and add the asp-code listed above + whatever "human readable" content you want.

    if you're hosting on a linux server, create an error page with php (eg "error404.php") and add the php-code listed above + whatever "human readable" content you want.

    In your Godaddy control panel, set the 404 page to the page you just created (eg error404.asp or error404.php).

    If you can't get it to work, pm me, I'll mail you whichever file you want :)
     
    softplus, Apr 6, 2006 IP
  13. jamesplato

    jamesplato Active Member

    Messages:
    359
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    60
    #13
    I thought I would share a solution I just implemented.

    
    
    <?php header("HTTP/1.0 404 Not Found"); ?> 
    <html> 
    <head> 
    <meta name="robots" content="noindex, nofollow"> 
    <TITLE>Page Not Found</TITLE> 
    </head>
    
    bla bla
    
    
    Code (markup):
     
    jamesplato, Aug 17, 2006 IP
  14. everett sizemor

    everett sizemor Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14

    EXACTLY what I was looking for. Thanks Brainmass! Works like a charm. :D
     
    everett sizemor, Jan 19, 2007 IP
  15. basket_case

    basket_case Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    You will also get this warning in sitemaps if you use an htaccess to redirect non-existent pages to an actual page. I got the warning and my rankings in G fell because of it. Having no 404 errors seemed like a good idea, but apparently not in G's eyes.
     
    basket_case, Jan 19, 2007 IP