Verifying an ExpressionEngine website with Google Webmaster Tools

Posted on 24 July 2008 at 02:19pm. 0 comments.

If you are using the “Exclude List Method” to remove index.php from your ExpressionEngine URL’s, and you want to be able to verify your website with Google Webmaster Tools, there are two important steps that you will need to carry out.

I prefer to use the “verify file” method within Google Webmaster Tools, simply because it negates the need for an extra line of code required for the “verify meta tag” alternative. However, when combining this verification method with the “Exclude List Method” for removing index.php from your URL’s, Google will not be able to access the file, and will therefore not be able to verify it.

The first step then, is to add the name of the verification file which Google provides you into your .htaccess file alongside your other “real” folder and file names (don’t forget the backslash before the ”.html”. E.g. google47a528f532heha43\.html). Once uploaded, when you try to access the verification file you should be presented with a blank page. Step one done.

The second step, if you haven’t already done so, is to ensure that you have setup a “404 (not found)” error page template, and you have told ExpressionEngine to use it for pages that cannot be found. To point ExpressionEngine to your 404 template, go to Templates > Global Template Preferences. Without doing this, Google will detect an HTTP status code of “200 (OK)” on error pages and your site will not be verified - on pages that don’t exist, Google must see a “404 (not found)”.

With all of this done, you should be able to verify your site and begin making use of Google Webmaster Tools.

Comments

  1. There are currently no comments for this article.

Leave a comment

Fields marked with * are required.

Your email address will not be published or shared with anyone else.