Perform Google Search Console Verification with Discourse

:bookmark: 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.

:person_raising_hand: 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

  1. Navigate to Google Search Console and set up a new property by entering the URL of your forum:
  2. 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

  1. In the verification options, select “Domain name provider”.
  2. Copy the string Google provides: google-site-verification={string_here}.
    1. Log into your DNS provider.
    2. Go to where you manage DNS entries for your domain.
    3. 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.
    4. Save the entry.
  3. Return to GSC and click “Verify” under Domain Name Provider.
  4. Your domain should now be verified.

Method 2: Adding an HTML tag

  1. In the verification options, select “HTML Tag” to generate a unique verification tag:
  2. On your forum, go to /admin/customize/themes and select “Components”:
  3. Create a new theme component by clicking “Install” → “Create new”. Name it meaningfully, e.g., “GSC Verification”, then click “Create”:
  4. Attach this new component to all of your themes.
  5. Select “Edit CSS/HTML” under the “Custom CSS/HTML” section:

  1. Paste the HTML tag provided by GSC into the <head> section, then save the changes.

  2. Return to GSC and click “Verify”.

  3. Your domain should now be verified.

Last edited by @MarkDoerr 2024-08-18T12:47:50Z

Check documentPerform check on document:
21 Likes