This guide describes how to perform Google Search Console (f.k.a Google Webmaster Tools) verification with Discourse. You can verify domain ownership using two methods - by creating a TXT DNS record or by adding an HTML tag.
Required user level: Administrator
Performing Google Search Console verification with Discourse
Verifying your Discourse site with Google Search Console (GSC) ensures that Google can access your site’s data for accurate search indexing and analysis. This guide details two methods to verify domain ownership: creating a TXT DNS record (recommended) and adding an HTML tag
Summary
This document covers:
- Steps to set up a new property in Google Search Console
- Verifying domain ownership via TXT DNS record
- Verifying domain ownership via HTML tag
Setting up a new property in Google Search Console
- Navigate to Google Search Console and set up a new property by entering the URL of your forum:
- Google Search Console will attempt to verify your ownership of the domain. Once this fails, you will be presented with a list of verification methods:
Verifying Domain Ownership
Method 1: Using the site setting (Recommended)
- In the verification options, select “HTML Tag” to generate a unique verification tag.
- From the HTML tag that Google provides, copy only the verification token:
<meta name="google-site-verification" content="THIS_IS_THE_TOKEN_YOU_NEED">
- On your site , go to your Admin → Site Settings by clicking on the gear icon and selecting “Admin”.
- Navigate to “Basic Settings” > “Analytics”.
- Find the setting
google site verification token
setting and paste the verification token you copied (only the content value, not the entire HTML tag). - Click “Save”.
- Return to GSC and click “Verify”.
- Your domain should now be verified.
Method 2: Creating a TXT DNS record
- In the verification options, select “Domain name provider”.
- Copy the string Google provides:
google-site-verification={string_here}
.- Log into your DNS provider.
- Go to where you manage DNS entries for your domain.
- Create a new TXT entry:
- Ensure the hostname (or name) is either the sub-domain of your forum or
@
if it is on your root domain. - Paste the value exactly as provided by GSC.
- Ensure the hostname (or name) is either the sub-domain of your forum or
- Save the entry.
- Return to GSC and click “Verify” under Domain Name Provider.
- Your domain should now be verified.
Method 3: Manually Adding an HTML tag
- In the verification options, select “HTML Tag” to generate a unique verification tag:
- On your forum, go to
/admin/customize/themes
and select “Components”:
- Create a new theme component by clicking “Install” → “Create new”. Name it meaningfully, e.g., “GSC Verification”, then click “Create”:
- Attach this new component to all of your themes.
- Select “Edit CSS/HTML” under the “Custom CSS/HTML” section:
-
Paste the HTML tag provided by GSC into the
<head>
section, then save the changes.
-
Return to GSC and click “Verify”.
-
Your domain should now be verified.
Last edited by @SaraDev 2025-10-09T19:22:54Z
Last checked by @SaraDev 2025-10-09T19:18:36Z
Check document
Perform check on document: