Google Site Verification

by Canonical SEO on September 6, 2009

Verifying a Site at Google

Before you can access information about your site using Google’s Webmaster Tools (WMT), you must successfully complete Google’s site verification process.  This is a process that Google has put in place to allow you to verify that you are, indeed, the webmaster or owner of the web site whose information you are attempting to access. 

How to verify your site for Google’s Webmaster Tools 

If you don’t already have one, you will need to create a Google Webmaster Tools account.  Next you will need to log into your WMT account.  On the WMT home page click on the ADD SITE button, and enter the URL of the site that you would like to verify and manage.  Then press the CONTINUE button. 

You will next be taken to Verify Ownership screen that allows you to select a verification method.  Be sure that the Site URL is correct.  The verification status should display as NOT VERIFIED.  The user interface will ask you to select how you would like to verify your site. There are three methods available for site verification.  They are: 

  • Meta tag verification method
  • HTML File verification method 
  • DNS TXT record verification method

All methods are acceptable and none of the methods provide any additional benefits over the other.  Since a single Google WMT account can be used to manage multiple web sites, it should be noted that not ALL of those sites have to be verified the same way.  Some can be verified with the meta verification method, others with the file verification method, and still others with the DNS TXT record method. 

How does meta site verification work? 

This method of verifying your site is typically the easiest method if you have the ability to change the HTML for your home page.  It uses… yep… you guessed it… an HTML <meta> element.  

The general idea is that you place a <meta> element in the <head> section of your home page with a specific value specified by the Google WMT interface.  Google figures that if you can add a <meta> element to the home page HTML of the site then you MUST be the owner or webmaster for that web site. 

To use the meta verification method, select “Meta tag” from the Verification Method dropdown. A text box will appear below the dropdown and display a <meta> element that looks similar to the following: 

<meta name=”verifiy-v1” content=”pg9LeoR9wh4szzb9Qv/bUUgsaWbfH+P9Q=” /> 

Copy the <meta> element from the text box into your clipboard, Notepad, or another editor.  You will need it later!  Don’t worry.  If you “lose it” the you can always get it back by using the following steps: 

  • Log into WMT
  • Click on the VERIFY THIS SITE button next to the web site name
  • Select the “Meta tag” option from the Verification Method dropdown 

The <meta> element will reappear in the text box below the dropdown.  You can return to your WMT home page by pressing the VERIFY LATER button. 

Note: This <meta> element value doesn’t change each time you visit the verification screen.  In fact, ALL sites that you verify using a single WMT account will share the same <meta> element value. 

To prove that you are the site owner or webmaster, add this <meta> element to the <head> section of your home page’s HTML.  Just “how” you do this will vary from site-to-site depending on whether you have a strictly HTML site, use a server-side scripting language, or use some type of content management system (CMS).  

You will know you have made the correct change to your home page when you can browse your home page, view the HTML source from the browser, and see the Google <meta> verification element in the <head> section. 

Once you have the Google verification <meta> element appearing properly in the <head> section of your home page’s HTML source, simply: 

  • Log into Webmaster Tools
  • Click on the VERIFY THIS SITE button next to the web site name
  • Be sure the “Meta tag” option is selected from the Verification Method dropdown
  • Click the VERIFY button at the bottom of the screen 

Google will request your home page and check that the appropriate <meta> element is there.  If it finds your meta verification element in the HTML source then your site will be flagged as VERIFIED. 

How does HTML file site verification work? 

The HTML file verification method is often simpler in that it does NOT require modifying code on your site.  However, if your site does not handle 404 Not Found errors correctly then you will NOT be able to use this method to verify your site.  Allow me to explain! 

The general idea for the file verification method is that you download an HTML file from Google’s Webmaster Tools that is specific to your account and upload that file to the root folder of your web.  Google figures that if you can add a file to the root of your web then you must be the owner or webmaster for the site in question. 

To use the file verification method, select “Upload an HTML file” from the Verification Method dropdown. Four instructions will appear below the Verification Method dropdown. Follow the first instruction by clicking on the “this HTML verification file” hyperlink.  Download and save the file to your local machine.  Be sure you do not change the file name specified by Google’s Webmaster Tools in any way. The verification HTML file name should look  similar to the following: 

google6a9d5c8b6aa72973.html 

Again, if you “lose” the file name then you can always get it back by using the following steps: 

  • Log into WMT
  • Click on the VERIFY THIS SITE button next to the web site name
  • Select the “HTML file” option from the Verification Method dropdown 
  • Click on the “this HTML verification file” hyperlink that appears in instruction #1

You can now save the file to your local machine again.  You can return to your WMT home page by pressing the VERIFY LATER button. 

Note: Similar to the <meta> element value, the HTML file name doesn’t change each time you visit the verification screen.  In fact, ALL sites that you verify using a single WMT account will share the same HTML file name. 

To prove that you are the site owner or webmaster, simply upload the HTML verification file downloaded from the Google WMT verification screen (for example, google6a9d5c8b6aa72973.html) to the root folder for your web.  Verify that you can browse the file by using your browser to request the file (e.g. http://www.example.com/google6a9d5c8b6aa72973.html).

Once you have proven you can successfully browse the Google HTML verification file in the root of your web, simply: 

  • Log into Webmaster Tools
  • Click on the VERIFY THIS SITE button next to the web site name
  • Be sure the “Upload an HTML file” option is selected from the Verification Method dropdown
  • Click the VERIFY button at the bottom of the screen 

Google will then request the file name specified on the verification screen from the root of your web.    

If your web server does NOT return a 200 Ok status when Google requests the verification HTML file from the root of your web then your site will fail verification. 

If your web server DOES return a 200 Ok status when Google requests the verification HTML file then you are half way there!  With HTML file verification, Google takes things one step further.  

To insure that your web server is configured to handle 404 Not Found errors appropriately, Google will next request some random file name which they know should not exist on your server (for example, they might requests something random like “/googlewlskjwer31398198sois8e8191838slldd831.notfound”).  

If your web server returns a 200 Ok status for the request for the non-existent file then your site will fail verification.  Your server “should” return a 404 Not Found status when a request for a non-existent file is processed.  Since your server, in this case, is returning 200 for non-existent files, Google cannot trust that the verification HTML file actually exists on your server.  So the verification process fails. 

If your server returns a 404 Not Found status for the request for the non-existent file then Google knows that it is properly configured to handle requests for non-existent files and can therefore feel sure that the HTML verification file DOES exist on your server.  Google will flag your site as VERIFIED. 

How does the DNS TXT record verification method work?

This method of verifying your site is relatively new.  The general idea is that you create a TXT record within your domain’s DNS configuration with a specific value specified by the Google WMT interface.  Google figures that if you can add a modify the DNS configuration for the domain then you MUST be the owner or webmaster for that web site. 

To use the DNS TXT record verification method, select “Add a DNS record” from the Verification Method dropdown. A text box will appear below the dropdown and display a value that looks similar to the following: 

google-site-verification:DSMLMjT6Gbmzml47RgDOOXxADygiU5X32kuRzaG2vqg

Copy the value from the text box into your clipboard, Notepad, or another editor.  You will need it later!  Don’t worry.  If you “lose it” the you can always get it back by using the following steps: 

  • Log into WMT
  • Click on the VERIFY THIS SITE button next to the web site name
  • Select the “Add a DNS record” option from the Verification Method dropdown 

The DNS TXT record value will reappear in the text box below the dropdown.  You can return to your WMT home page by pressing the VERIFY LATER button. 

Note: This DNS TXT recordvalue doesn’t change each time you visit the verification screen.  In fact, ALL sites that you verify using a single WMT account will share the same DNS TXT record value. 

To prove that you are the site owner or webmaster, create a TXT record within your DNS configuration with the value specified by the Google Webmaster Tools UI. Allow some time for the DNS changes to propagate.

Once the DNS changes have propagated, simply: 

  • Log into Webmaster Tools
  • Click on the VERIFY THIS SITE button next to the web site name
  • Be sure the “Add a DNS record” option is selected from the Verification Method dropdown
  • Click the VERIFY button at the bottom of the screen 

Google will request your domain’s DNS information and verify that the appropriate TXT record exists.  If it finds your verification TXT record then your site will be flagged as VERIFIED. 

Once your site is verified with Google 

Be sure that you verify both the www AND non-www version of your site.  As long as the DNS for both are pointed to the same code base and/or same root folder, to verify the “other” version of your site all you need to do is: 

  • Log into Google’s Webmaster Tools
  • Click on the ADD SITE button
  • Enter the URL of the “other” version of your site (www version if you previously verified non-www version OR non-www version if you previously verified the www version)
  • At the Verification screen select the same verification method used to verify the previous version of the site (“Meta tag” or “HTML file”).
  • Press the VERIFY button at the bottom of the screen. 

Since both versions of the URL (www.example.com or example.com) render the same HTML (for meta verification), share the same DNS configuration (for DNS TXT record verification), or can be used to access the same files in the root (for HTML file verification), the verification should succeed immediately.

{ 6 comments… read them below or add one }

Leave a Comment

Previous post:

Next post: