Results 1 to 8 of 8
  1. #1
    pph Expert! Gordon's Avatar
    Join Date
    January 18th, 2005
    Location
    Edmonton Canada
    Posts
    5,781
    404 (file not found) error page
    I was not sure where to post this, if a mod feels it is in the wrong forum please feel free to move it.

    I received this message from Google.com in relation to their Sitemaps (BETA) program.

    ------- start of message --------------
    We've detected that your 404 (file not found) error page returns a status of 200 (OK) in the header.
    this configuration presents a security risk for site verification and therefore, we can't verify your site. If your web server is configured to return a status of 200 in the header of 404 pages, and we enabled you to verify your site with this configuration, others would be able to take advantage of this and verify your site as well. This would allow others to see your site statistics. To ensure that no one can take advantage of this configuration to view statistics to sites they don't own, we only verify sites that return a status of 404 in the header of 404 pages.

    Please modify your web server configuration to return a status of 404 in the header of 404 pages. Once your web server is configured correctly, try to verify the site again. If your web server is configured this way and you receive this error, click Check Status again and we'll recheck your configuration.

    ------ end of message -----------

    I have put this in my .htaccess file (below) is this what is causing the problem? if so what should I do about it please?
    ErrorDocument 404 /404.php
    I have created the 404.php page and this gives visitors the navigation and a reason they are on that page.

    If this is not what is causing the problem could you suggest anything that might be please?

    Thanks in advance.
    One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
    Mr. Spitzer is fetching it nearer

    YouTrek

  2. #2
    Full Member
    Join Date
    February 14th, 2005
    Location
    Texas
    Posts
    220
    The best way to test this is to go to your site and enter a URL you know doesn't exist. Some like 1234.htm. Then check your server log and see what code was given to that request. If it's a 200 code then something is set up wrong. It should return something like:

    404: "345" bla bla bla

    If it returns 200: "404" bla bla bla

    Then the server is set up wrong or something in your .htaccess file is over-riding the server command.

  3. #3
    pph Expert! Gordon's Avatar
    Join Date
    January 18th, 2005
    Location
    Edmonton Canada
    Posts
    5,781
    Does this mean it is a 200? I asked for gordon.html a file that does not exist and I got this from my Raw Log file

    [30/Aug/2005:21:33:16 +0000] "GET /gordon.html HTTP/1.1" 200 160921 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
    One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
    Mr. Spitzer is fetching it nearer

    YouTrek

  4. #4
    Resident Genius and Staunch Capitalist Leader's Avatar
    Join Date
    January 18th, 2005
    Location
    Florida
    Posts
    12,817
    Yep, it's giving a "200" response. I've bolded the part you need to look for, so you can spot it in your logs when you check:

    [30/Aug/2005:21:33:16 +0000] "GET /gordon.html HTTP/1.1" 200 160921 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
    Here's the thread I started asking about the same kind of thing a while back. Since you have your 404 as a .php page, I'm figuring the site in question is in PHP:
    http://forum.abestweb.com/showthread.php?t=57834

    The suggestions were a good start, but it took me buzzing by the PHP docs to get all the kinks out.
    There is no knowledge that is not power. ~Hemingway

  5. #5
    pph Expert! Gordon's Avatar
    Join Date
    January 18th, 2005
    Location
    Edmonton Canada
    Posts
    5,781
    Thanks Leader I've readf the php stuff and I figured out I needed to do what I have below, (added the bolded bit) but I'm not sure I've done it right.

    Can anybody tell me if I am doing the correct thing please? I have added the bolded bit to my custom 404 page but google is still unable to verify mt site.

    I am hoping someone can either confirm I am doing it right then I can contact httpme.com and tell them it is their configuration that is wrong or if someone can tell me where I am doing it wrong then I can correct it.

    <?
    // I have a php script here that emails me when someone arrives at this 404 page.
    ?>
    <html>
    <?php
    header("HTTP/1.0 404 Not Found");
    ?>

    <head>
    <title>My site is the best in the world.</title>
    <meta name="description" content="xxxxx" />
    <meta name="keywords" content="xxxxx" />
    </head><body>
    rest of the page
    </body>
    </html>
    One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
    Mr. Spitzer is fetching it nearer

    YouTrek

  6. #6
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    551
    Hi Gordon,

    Move your header command above the html stuff.

    <?php
    header("HTTP/1.0 404 Not Found");
    ?>
    <html>
    <head>
    <title>Wayders site is the best in the world.</title>
    <meta name="description" content="xxxxx" />
    <meta name="keywords" content="xxxxx" />
    </head>
    <body>
    rest of the page
    </body>
    </html>

    I dont have an issue with my httpme account & 404's, but your on a different server to me. Just drop them a line through support. https://support.httpme.com/

    Way...

  7. #7
    pph Expert! Gordon's Avatar
    Join Date
    January 18th, 2005
    Location
    Edmonton Canada
    Posts
    5,781
    Thanks Wayder

    I'll try that, first then if it does not work I'll drop them another line. I must add it was their guys who told me to put it where I have it though some support eh? LOL

    BTW. I think you are taking advantage of me by altering my title tags you know mine is the best.
    One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
    Mr. Spitzer is fetching it nearer

    YouTrek

  8. #8
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    551
    I was going to give you

    <?php
    header ("location:http://www.wayders-site.com/");
    exit;
    break;
    ?>

    but resisted


  9. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Optimizing your 404 error page is one of the most overlooked SEO techniques
    By Billy Kay in forum Search Engine Optimization
    Replies: 5
    Last Post: February 12th, 2014, 06:28 PM
  2. Site error and Page not found
    By specusa in forum Search Engine Optimization
    Replies: 2
    Last Post: July 27th, 2013, 02:37 PM
  3. All clicks return 404 error page
    By vivekar in forum Commission Junction - CJ
    Replies: 3
    Last Post: February 6th, 2008, 11:42 PM
  4. Depressed 404 Error Page
    By Linda - 5starAffiliatePrograms in forum Virtual Family and Off-Topic
    Replies: 5
    Last Post: October 30th, 2003, 02:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •