HOWTO: Verify a site on Google Webmaster Tools (D7, D8)

Last updated on
21 August 2022

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

Step 1

Get a verification key from Google Webmaster Tools by clicking on the the alternate methods tab and selecting the HTML Tag option. Copy it to the window of an open text editor. It should look something like this:

<meta name="google-site-verification" content="SOMESTRINGGOESHERE" />

The important part is the value of the "content" attribute, so remove the rest of the string so it looks like the following:

SOMESTRINGGOESHERE

Step 2

Make sure the Metatag: Verification module is enabled, it comes with the main Metatag module; follow the Drupal User Guide to install the module.

Step 3

On admin menu go to Configuration > Search and Metadata > Metatag

Across from the Global item, open the Override or Edit link, as is appropriate.

Click to expand the Site Verification section (underneath Advanced).

Copy and paste the verification key from step 1 into the "Google" field.

Click the Save button.

Step 4

The metatag should be added to all pages and should look like this

<meta name="google-site-verification" content="SOMESTRINGGOESHERE" />

Help improve this page

Page status: No known problems

You can: