Research tools - laptops for the Internet and handhelds for mobile usability testing

isham research

Google's verification meta tag

Phil Payne is a Google Bionic Poster and Top Contributor based in Sheffield UK. The opinions here are not Google's

If you decide to use Google's Webmaster Tools to implement Google's XML format sitemaps, now supported by Yahoo, Ask Jeeves and Bing the search engines may require you to "verify" that you own the site. Verification has other benefits - Google Webmaster Tools provides a wealth of data about your site, and it also permits you to submit "trusted" items - such as spam reports and reconsideration requests - to Google.

For the time being, only Google, Yahoo and Bing have a formal site verification system. But there are some hoops to jump through.

The original technique for Google was to add a dummy file to the site using a name supplied by Google. But all search engines now support verification by meta tag.

If using the file technique the server MUST return a 404 response for an invalid page. This is simple to check - go to http://gsitecrawler.com/tools/Server-Status.aspx and put in your site's name plus a fictitious page address: http://[your domain]/wibblewobble.html will do for test purposes - and click the button for all the headers. The server response code MUST be 404. It should look much like this response for the isham research web site:

Results of the GSiteCrawler Server-Test
Tested at 12/7/2006 10:44:57 AM / from 86.31.114.137:

URL=http://www.isham-research.co.uk/wibblewobble.html
Result code: 404 (NotFound / Not Found)
Date: Thu, 07 Dec 2006 10:45:01 GMT
Server: Apache/1.3.36 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.2 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.27 OpenSSL/0.9.7a
Content-Type: text/html; charset=iso-8859-1

Any other result code in the above - such as a "Result code: 200" returned by a custom "page missing" page - will cause Google's file-based Webmaster Tools verification to fail. A result code of 500 is worse in some ways, because Google will think the error is temporary and produce confusing diagnostics.

The other way - not needing a 404 for a missing page - is to add a Google verification tag to the home page's HTML code. If you cannot get access to your server or your ISP forces a custom 404 page with a server response of 200, this may be your only option.

This is where the problem starts. Google will supply a skeleton meta tag for you to cut and paste that will look something like the following. This is an isham research tag used purely as an example:

<META name="verify-v1" content="yIwcQZSJOMEPnR6F16VNu+KWxyZOBDA/ep6fJjdllh8=" />

The contents of your tag will obviously be different.

The problem is that this HTML is BROKEN. Yes, that's right - Google shipped bad code - that tag will fail verification in both HTML and XHTML documents. More recently, Google has been shipping a lower-case version that works fine for XHTML - but still screws up HTML. And, of course, if you downloaded it a while ago you may still have the famously incorrect version.

For HTML documents, the XHTML-style closing " /" should be removed:

<META name="google-site-verification" content="yIwcQZSJOMEPnR6F16VNu+KWxyZOBDA/ep6fJjdllh8=">

For XHTML documents, the supplied closing is correct but in XHTML all tag names must be in lower case:

<meta name="google-site-verification" content="yIwcQZSJOMEPnR6F16VNu+KWxyZOBDA/ep6fJjdllh8=" />

The same problem has been observed in Yahoo verification meta tags:

<META name="y_key" content="6a904c5542b950dd" />

The precise effect of having this error in your site's code is still a matter of debate and is likely to change with algorithm creep. Certainly it breaks the W3 HTML validator at http://validator.w3.org and Rex Swain's HTML validator at http://www.rexswain.com/httpview.html and there is a good chance it will break at least some of the search engine bot parsers. The most likely effect is the loss of all <head> tags behind the broken Google tag, with parsing resuming at the <body> tag. So if the Google tag is placed right behind the <head> all metatags may be ignored - if it's just before the </head> it may have no effect. The is the most obvious indication of this problem is the message:

Error Line 29 column 6: end tag for element "HEAD" which is not open.

</head>
The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

There's also a page about other meta tags

or call 07833 654800      Back to the Web Site Services Page