iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-28-2007, 06:08 AM
pagetta's Avatar
WebProWorld Veteran
 
Join Date: Nov 2004
Location: UK
Posts: 509
pagetta RepRank 2
Default google returning 200 ok header on 404 page

I have a custom 404 error message page and according to this headercheck it returns a 404 header.
However google webmaster tools will not allow me to choose between mysite.com and www.mysite.com as they say my 404 error page is returning a 200 ok message so they cannot verify the site.
does anyone know how to fix this?
many thanks
Reply With Quote
  #2 (permalink)  
Old 02-28-2007, 06:35 AM
Webnauts's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: Aug 2003
Location: Worldwide
Posts: 8,164
Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9Webnauts RepRank 9
Default

Can you at least tell the URL?
__________________
"Being an expert isn't telling other people what you know. It's understanding what questions to ask, and flexibly applying your knowledge to the specific situation at hand. Being an expert means providing sensible, highly contextual direction." Jeff Atwood
SEO Workers - Search Engine Optimization Consulting Company | SEO Analysis Tool | Webnauts Net SEO
Reply With Quote
  #3 (permalink)  
Old 02-28-2007, 06:36 AM
pagetta's Avatar
WebProWorld Veteran
 
Join Date: Nov 2004
Location: UK
Posts: 509
pagetta RepRank 2
Default

oh yes sorry my mistake
www.codestone.net/404.php
Reply With Quote
  #4 (permalink)  
Old 02-28-2007, 10:20 AM
wige's Avatar
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,648
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default

It definitely gives a 404 header, however it redirects after a few seconds. That redirect might be the problem.

Also, any request without a www. seems to get redirected to www.codestone.com, so google probably wouldn't give you the choice since it can't access anything in the non-www version.
__________________
The best way to learn anything, is to question everything.
Reply With Quote
  #5 (permalink)  
Old 02-28-2007, 10:30 AM
pagetta's Avatar
WebProWorld Veteran
 
Join Date: Nov 2004
Location: UK
Posts: 509
pagetta RepRank 2
Default

ahhh - thanks for pointing out the redirect that was a hangover from a different solution that i tried have removed that now!

yeah the page is definitely returning a 404 redirect even after that but google won't verify it. I am not very good at the server side stuff but i am SURE i set up a 301 redirect from non-www to www urls but on my browser it is just giving me a 'page under construction' message for these. I will look into this thanks for the tips.
Reply With Quote
  #6 (permalink)  
Old 02-28-2007, 02:17 PM
incrediblehelp's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,573
incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4
Default

Quote:
Originally Posted by wige
Also, any request without a www. seems to get redirected to www.codestone.com, so google probably wouldn't give you the choice since it can't access anything in the non-www version.
Nah they should still allow you to do it. They have for me. Any new news on this pagetta?
Reply With Quote
  #7 (permalink)  
Old 02-28-2007, 05:00 PM
WebProWorld New Member
 
Join Date: Aug 2004
Location: Lima - Peru
Posts: 14
corvettehunt RepRank 0
Default 301 to homepage

Yes, you have set (IMO incorrectly), your 301 redirect

http://codestone.net/404.php => http://www.codestone.net/

When it should do this:

http://codestone.net/404.php => http://www.codestone.net/404.php

If you are using apache, your .htaccess should contain:

RewriteCond %{HTTP_HOST} ^codestone.net[NC]
RewriteRule ^(.*)$ http://www.codestone.net/$1 [L,R=301]

That would do the trick. Cheers!
Reply With Quote
  #8 (permalink)  
Old 02-28-2007, 05:11 PM
chowell's Avatar
WebProWorld Pro
 
Join Date: Oct 2003
Location: Phoenix, AZ
Posts: 224
chowell RepRank 1
Default Soft 404 error

We had the same problem:

Quote:
You need to use a relative URL not the full domain name in the ErrorDocument directive to trigger the correct 404 Not Found response.

Your use of the full domain name triggers a redirect and thus a 200 OK response.
For example:
ErrorDocument 404 /404.html
Reply With Quote
  #9 (permalink)  
Old 02-28-2007, 05:30 PM
WebProWorld Member
 
Join Date: Jul 2003
Location: Philadelphia
Posts: 82
dean RepRank 1
Default

I seem to recall when I had the same problem that google has an alternative method of verifying the site by adding a meta tag instead of uploading a file. Using this method will verify you regardless of the response headers.
Reply With Quote
  #10 (permalink)  
Old 03-01-2007, 05:22 AM
pagetta's Avatar
WebProWorld Veteran
 
Join Date: Nov 2004
Location: UK
Posts: 509
pagetta RepRank 2
Default

Hi thanks for your help with this

Chowell - my htaccess has the path as relative not full domain so i know that's not the issue.

corvettehunt thanks for the code there i will give that a go

i'll have a look at google's alternative methods too see if i can't get this sorted this morning!
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 05:57 AM.



Search Engine Optimization by vBSEO 3.3.0