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.

Trying to verify a Google sitemap I get an error message like this:

Discussion in 'Google Sitemaps' started by miko67, Jan 14, 2006.

  1. #1
    [SIZE=-1]Google gives me this message and explanation when I try to verify a Sitemap:[/SIZE][SIZE=-1]
    and I have no idea what to do about it.

    Is it all about mod-rewriting in my .htaccess file?

    If it is about mod-rewriting, do anyone here have any idea what to write?

    Incidentally Google seems to be indexing (all my pages more or less) and then de-indexing quite a lot on a daily basis... I wonder what that is all about?[/SIZE]
     
    miko67, Jan 14, 2006 IP
  2. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You probably have custom 404 pages, right?

    Maybe you redirect 404's to a standard page? Basically, the issue is your 404s throw up a 200 status, not a 404. If you are not familiar with those things then it must have been something your host has kindly set up, but wrongly so! Contact them I'd say.
     
    T0PS3O, Jan 14, 2006 IP
    miko67 likes this.
  3. Matts

    Matts Berserker

    Messages:
    195
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #3
    It's about http status codes, and what your server is returning when a page is not found.

    200 OK means the file was found
    404 Not Found means the file doesn't exist

    These are status codes sent in the http header, and you can't see them directly. You either need to use ethereal to sniff and watch, or look in the access_log of the web server, where you'll see them logged for each request sent to the server.

    So what G is doing is having you place a file on your server with a unique name, and then they access it [using HEAD and not GET] to see if it exists. The server should return a 200 Ok. Then G requests a random made up name like "test_404_response_page_ahas9a0aa01ajHasn", which should return a 404 Not Found. If the GoogleBot receives a 200 Ok then it means that the server always returns a 200 Ok, regardless of whether the file is there or not, and so G can't actually verify the file exists [i.e. the server always says the file exists no matter what].

    If you have a custom 404 page that says 'sorry page not found' and it's not sending a 404, and you have php installed add to the top of the custom 404 page:
    <?php
    header('HTTP/1.0 404 Not Found');
    ?>
     
    Matts, Jan 14, 2006 IP
  4. miko67

    miko67 Well-Known Member

    Messages:
    769
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    120
    #4
    ok, thx a lot. Tried this one.

    My wordpres theme does not have a 404 page, but an post loop on the index page, if no page match - then message = "Sorry, no posts".

    I tried to make an include to 404.php, but that inserts the 404 page in the index (not good because now I get a header error with your php header inserted in the middle of the body).

    I need a php command to move to 404.php (I'm a php novice still) - How do I do this?
     
    miko67, Jan 14, 2006 IP
  5. Matts

    Matts Berserker

    Messages:
    195
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #5
    Look at this page on your site: www.coffeecoffee.be/404_qwerty

    Find out why that's showing up. It's not a Wordpress issue. Your server is configured to render that page when a page isn't found. Once you know that and fix it, the 404's should get returned.
     
    Matts, Jan 14, 2006 IP
    miko67 likes this.
  6. miko67

    miko67 Well-Known Member

    Messages:
    769
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    120
    #6
    Update:

    I am now trying this:
    and It gives me a beautiful 404 not found message with no reported errors (you can see it on: http://www.coffeecoffee.be/blahblah). However I cannot get it to verify because the header is still not what it is supposed to be.

    I guess it is because I put the contents of the 404.php page (including the "<?php header("HTTP/1.1 404 Not Found"); ?>" sentence) in the body of the page, which obviously is wrong, but I cannot figure out how to clear the page so the header is being red as a header - if you understand what I mean?

    It's close to midnight here, I'm deep in php books that used to be unopened, and I am not resting until this is working.

    Any help is truly appreciated.
     
    miko67, Jan 14, 2006 IP
  7. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Rather than looking in the php code I'd check the underlying issue of your server doing this. Though there is a chance that it is the application (WP) that has some application top functionalilty that creates those pages.

    If you want to stick with the php fix then do a header 301 redirect to that 404 page so you'll end up eventually with the correct 404 header.
     
    T0PS3O, Jan 14, 2006 IP
  8. miko67

    miko67 Well-Known Member

    Messages:
    769
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    120
    #8
    Allright, you're giving me more things to question here, but I'll read up on it and see if I can figure it out (a header 301 redirect:confused: ).

    Meanwhile... This is my source for any non existing URI, showing how the code described earlier results in a 404.php page showing up in the main text area of the body of the index file.

    I basically want to use php to get rid of all the stuff I made blue so that the header can be read again (I'm propably not making a lot of sense any more but please bear with me).

     
    miko67, Jan 14, 2006 IP
  9. Matts

    Matts Berserker

    Messages:
    195
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #9
    I agree with TOPS30, I don't think it's wordpress, and believe it's your webserver setup. As TOPS30 said in the first recommendation, contact the hosting company and tell them to turn off the 404 handler. Do it in the morning with a fresh start.
     
    Matts, Jan 14, 2006 IP
  10. miko67

    miko67 Well-Known Member

    Messages:
    769
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    120
    #10
    Ok I investigated a bit further.

    My host has a 404.html page for all pages.

    I should mention that I am on a subdomain with http://www.coffeecoffee.be/ pointing to it.

    On other subdomains I go straight to hosts 404.html page, but on this one with wordpress installed (with permalinks and all), I initially got the wordpress template index page with a post loop telling me "sorry, no posts" if I made a 404_qwerty.

    Now I'm thinking to try and make something like this in the top of the template index file:
    but I cannot get the code to work so that it goes to my custom 404.php file when there are no posts and still works fine if there are posts.

    I strongly believe that I'm a schmuck at php :eek: :p and that it could be rather easy to make the script send the user to my 404.php page if there are no posts, and to run through the normal index header, body and all if there are.

    Going to bed now (it's 02:45 am and I have got the kids in the morning).

    I am Going to check up on this first thing in the morning though.
     
    miko67, Jan 14, 2006 IP
  11. enQuira

    enQuira Peon

    Messages:
    1,584
    Likes Received:
    250
    Best Answers:
    0
    Trophy Points:
    0
    #11
    If you are just trying to process the G sitemap verification, just rename the .htaccess, verify then rename it back (or simply turn the rewriting off)
     
    enQuira, Jan 22, 2006 IP
  12. miko67

    miko67 Well-Known Member

    Messages:
    769
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    120
    #12
    miko67, Jan 22, 2006 IP
  13. baybossplaya

    baybossplaya Active Member

    Messages:
    597
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    58
    #13
    is there a way to make the 404 redirect to the index?
     
    baybossplaya, Feb 11, 2009 IP
  14. miccy

    miccy Well-Known Member

    Messages:
    850
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    128
    #14
    i think it got something to do with ur htaccess me too having the same problem with my japanese av blog
     
    miccy, Feb 23, 2009 IP
  15. seocipl

    seocipl Member

    Messages:
    735
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    33
    #15
    Is present an approach in the direction of making the 404 forward toward the index ?
     
    seocipl, Feb 23, 2009 IP
  16. sellhousefast

    sellhousefast Active Member

    Messages:
    364
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    68
    #16
    I had this problem too. Thanks for the advice
     
    sellhousefast, Feb 25, 2009 IP
  17. sriraj46

    sriraj46 Peon

    Messages:
    102
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    200's means a file found and 400's means a file not found..
    And now a file found on a file not found. Interesting. Never came across such errors.
     
    sriraj46, Feb 25, 2009 IP
  18. robinko

    robinko Peon

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    404.php file


    <?php get_header(); ?>

    your message here

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
     
    robinko, Feb 26, 2009 IP