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.

Sitemap & 404 page

Discussion in 'Google Sitemaps' started by bentong, Dec 1, 2005.

  1. #1
    I've created a custom 404 page and adding this line on the .htaccess file

    however, after verifying the google sitemap I got this error msg

    any ideas? :confused:
    SEMrush
     
    bentong, Dec 1, 2005 IP
    SEMrush
  2. loki

    loki Peon

    Messages:
    95
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    same thing happened to me. i didn't really understand the messages, but have guessed that i need to put 404 in the title of the error page. have asked programmers to do so but so far they haven't got around to it, so can't say if that was the problem.

    anyone else make any sense of it?
     
    loki, Dec 2, 2005 IP
  3. Percept

    Percept Peon

    Messages:
    143
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I got the same problem, I can't get my sitemap verified because:

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

    My 404 page has the title: "Oops, 404 error" and google still doesn't get it so adding 404 to your title won't help.
     
    Percept, Dec 2, 2005 IP
  4. loki

    loki Peon

    Messages:
    95
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    what happens if you change "Oops, 404 error" for "404 error" or even just "404"?
     
    loki, Dec 2, 2005 IP
  5. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #5
    if you are using php, try adding
    <?
    header("HTTP/1.1 404 Not Found");
    ?>

    at the top of your notfound.html page.
     
    frankm, Dec 2, 2005 IP
  6. bentong

    bentong Banned

    Messages:
    3,543
    Likes Received:
    257
    Best Answers:
    0
    Trophy Points:
    0
    #6
    also works fine.

    I've just removed the errordocument line on the htaccess for verifying and put it back again after it has verified and it works....
     
    bentong, Dec 2, 2005 IP
  7. Percept

    Percept Peon

    Messages:
    143
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks, that did the trick.
     
    Percept, Dec 3, 2005 IP
  8. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #8
    :)

    sometimes apache messes up the error codes when redirected to another page: the original was a 404 (not found), went looking for the notfound.html which it did (200 OK).
     
    frankm, Dec 3, 2005 IP
  9. hepy

    hepy Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Do whatever you think to solve this problem, but remember:
    Google don't like 404(not found) errors
     
    hepy, Dec 19, 2005 IP
  10. MaxPowers

    MaxPowers Peon

    Messages:
    261
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #10
    This happens when the server finds the error page after changing it in the .htaccess

    I understand you are trying to display the homepage while returning an error and you don't want to set a 404 on your homepage.....

    I set the htaccess to redirect to (say) 404.php

    inside 404.php I use...

    <?
    header("HTTP/1.1 404 Not Found");
    include("http://www.automapit.com/index.html");
    exit;
    ?>

    This sets the error as a true 404 and doesn't request a 'new' page... it simply includes the code from your homepage as output so it 'looks' like your homepage... while it is actually a page called 404.php
     
    MaxPowers, Dec 28, 2005 IP
  11. donwebcorleone

    donwebcorleone Peon

    Messages:
    154
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    yeah i also find this trick quite relevant to bypass this annoying mistake
     
    donwebcorleone, Jan 24, 2006 IP