HOWTO: Verify a Drupal website for Google Search Console

Last updated on
16 September 2024

This page has not yet been reviewed by Metatag maintainer(s) and added to the menu.

Step 1

Get a verification key from Google Search Console by copying the TXT record from Step 3 in the Verify domain ownership via DNS record process. Copy it to the window of an open text editor. It should look something like this:

google-site-verification=SOMESTRINGGOESHERE

The important part is the value of the "google-site-verification" 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

In the admin menu go to Configuration > Search and Metadata > Metatag (/admin/config/search/metatag)

Click the Edit link next to the Global settings.

In the Site Verification section, copy and paste the verification key from step 1 into the Google Site Verification field.

Click the Save button.

Step 4

The metatag should now be added to all pages. Inspect a page's HTML and you should see something like this in the <head>.

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

Help improve this page

Page status: No known problems

You can: