Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Google WMT verification tag - include it on a custom 404 page?

         

brnm98105

1:25 pm on Dec 31, 2008 (gmt 0)

10+ Year Member



Recently, while using google webmaster tools, I found a problem which is :

Verification status: NOT VERIFIED
Last attempt Dec 31, 2008: We've detected that your 404 (file not found) error page returns a status of 200 (Success) in the header.

I added a metatag to my HOME PAGE like google asked

<meta name="verify-v1" content="pNTTefa2+CksgQ2kuBjvJ3vVTBthMUzlgxJ5BSYiNiQ=" /

Then uploaded and Google Verified it! All good. However Im concerned should I be adding somthins speacial to my custom 404 page? Also can I remove orshould I remove the META tag Google had me upload?

Thanks in advance.

Also on a side note. Ive heard debates. Should I just dump my Robots.txt file and add a meta tage robots follow all?

g1smd

7:05 pm on Dec 31, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Use Live HTTP Headers for Firefox to see that when you request a URL on your site that doesn't actually exist, your server returns 200 OK as the HTTP Status for that URL.

It matters not what the error message is, that users see. The HTTP Status Code in the HTTP Header determines whether a page "exists" or not. In this case, for pages that do not exist, the URL should directly return "404 Not Found" and should not return "200" and should not return any "30x" redirect code either.

This is a serious configuration error with the server software, and it is one that requires immediate fixing.

.

Google needs to revalidate your site periodically, so you need to either leave the meta tag on your root index page, or else choose to upload a named verification file instead. I prefer the separate file as that is a simple "fit it and forget it" action.

.

Use a robots meta tag only when you want to stop a page being indexed, and/or stop it being cached, and/or stop links from it being followed. Omit the tag if you don't need to stop anything; The default action is "index, follow" if no tag exists.

Robert Charlton

5:52 am on Jan 3, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Last attempt Dec 31, 2008: We've detected that your 404 (file not found) error page returns a status of 200 (Success) in the header.

A good place to start...

If you're using .htaccess and Apache, the syntax for your custom 404 page should be...

ErrorDocument 404 /custom404.html

...where custom404.html is the name of your custom 404.

brnm98105

7:28 pm on Jan 3, 2009 (gmt 0)

10+ Year Member



Ok Ive downloaded live http headers and dont really understand it. my .htaccess file already looks like ErrorDocument 404 /custom404.html. What can I do to fix this problem? Any Idea or help?

g1smd

7:45 pm on Jan 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The ErrorDocument directive must NOT include the domain name, just the folder-path and file name.

What is the status code returned for a URL that does not exist. Try accessing your site with a path that does not exist, and look at the output from Live HTTP Headers immediately after.

brnm98105

10:31 pm on Jan 3, 2009 (gmt 0)

10+ Year Member



Hers what it says

http://www.example.com/blank.htm

GET /blank.htm HTTP/1.1

Host: www.example.com

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

HTTP/1.x 302 Found

Date: Sat, 03 Jan 2009 22:28:17 GMT

Server: Apache/2.2.3 (Red Hat)

Location: http://www.example.com/notfound.htm

Content-Length: 316

Keep-Alive: timeout=30

Connection: Keep-Alive

Content-Type: text/html; charset=iso-8859-1

----------------------------------------------------------

http://toolbarqueries.google.com/search?client=navclient-auto&ch=6-1500027947&features=Rank&q=info:www.example.com/notfound.htm&num=100&filter=0

GET /search?client=navclient-auto&ch=6-1500027947&features=Rank&q=info:www.example.com/notfound.htm&num=100&filter=0 HTTP/1.1

Host: toolbarqueries.google.com

User-Agent: Mozilla/4.0 (compatible; GoogleToolbar 2.0.114-big; Windows XP 5.1)

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Cookie: PREF=ID=7474f0808a666e53:TM=1231013109:LM=1231013109:S=p_IrNQHvvIbivbpt; NID=18=ZCePewixjcJLlHPktosu5z4JTMTACPOm8NrjYZ_AT3sBxmQAqCrZTLNrPC-9S1Eu7JIfwgm8MqgKa4h577aS2zxlbQGhfdWBuin1OFjyqK7i0o9DrBizpRLpmxGnVitw

HTTP/1.x 200 OK

Cache-Control: private, max-age=0

Date: Sat, 03 Jan 2009 22:28:18 GMT

Expires: -1

Content-Type: text/html; charset=ISO-8859-1

Server: gws

Content-Length: 0

----------------------------------------------------------

Thanks for all your help. I'm great at a lot of things, but this is not my specialty.

[edited by: tedster at 11:08 pm (utc) on Jan. 3, 2009]
[edit reason] switch to example.com - it can never be owned [/edit]