HOWTO: Verify a Drupal website for Google Search Console
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
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion