HowTo: Verify a site on Facebook (D7, D8, D9)
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
This documentation needs review. See "Help improve this page" in the sidebar.
This provides an overview for adding Facebook site verification metadata to your site using the Metatag module.
Step 0
In order for these steps to work the "Metatag: Verification" module must be enabled.
Step 1
Get a verification key for your Drupal site from the Facebook Domain Verification site. Copy it to the window of an open text editor. It should look something like this:
<meta name="facebook-domain-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.
Step 3
The the 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.
Copy and paste the verification key from step 1 into the "Facebook" field.
Click the Save button.
Step 4
The metatag should be added to all pages and should look like this
<meta name="facebook-domain-verification" content="SOMESTRINGGOESHERE" />
Step 5
Visit the Facebook Webmaster entry for your site, and click the "Check" button to verify it's working.
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