Perform Google Search Console (a.k.a Google Webmaster Tools) Verification with Discourse

This howto goes over the methods you can use to verify domain ownership for Google Search Console, while using Discourse.

There are two methods you you can use to do this verification:

  1. Create a TXT DNS record - this is your best option!
  2. Add HTML Tag - only use this method if you don’t have DNS access, or can’t get a TXT DNS record to work.

Both methods start out the same:

  1. In the Google Search Console (GSC) set up a new property by entering the URL of your forum

  1. GSC will attempt to verify your ownership of the domain, which should fail. You will then be presented with a list of ways to verify your ownership.

Method 1: Create a TXT DNS Record

  1. In the verification options, select Domain name provider
    Note: currently this takes you to the old GSC console, so it looks different.

  2. In the list of domain registrars, find your DNS provider. If it isn’t listed, select other.

  3. In the steps below GSC will provide you with a string that looks similar to:
    google-site-verification={string here}

  4. If your registrar was listed, follow the directions Google provides.

  5. If your registrar wasn’t listed, you may need to contact your DNS providers support, the general process is:

    1. Log into your DNS provider
    2. Manage DNS entries for the domain
    3. Create a new TXT entry
      1. Make sure the hostname (or name) you use is the sub-domain of your forum or * if it is on your root domain, and the value should be pasted exactly as GSC provided it.
      2. Save the entry
  6. Now go back to GSC, select Verify, under Domain Name Provider

  7. Your domain should now be verified.

Method 2: Add HTML Tag

  1. In the verification options, select ‘HTML Tag’. This will give you a unique verification tag to copy

  1. Go to your /admin/customize/themes page and select Components

  1. Create a new theme component by clicking on InstallCreate new, give it a meaningful name (i.e. “GoogleSearchConsoleVerification”), and Create.

  1. Attach the component to all of your themes

  1. In your new component, select Edit CSS/HTML under the Custom CSS/HTML section

  1. In the <Head> section, paste the HTML tag generated by GSC Verification Wizard, then Save this change.

  1. Now go back to GSC and select Verify

  1. Your domain should now be verified. :partying_face: