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: 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 2: 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 @MarkDoerr 2024-08-18T12:47:50Z
Check document
Perform check on document: