// blog / indexing

How I set up Google Search Console verification on a WordPress site

For Google Search Console verification on WordPress, I add a Domain property and verify it with a DNS TXT record. It covers http, https, www and every subdomain at once, and no theme or plugin change can remove it. A URL-prefix property with an HTML tag works, but it only covers one version of the site.

By Muhammad Younus Updated 10 min read Indexing

Indexing and Search Console: illustration for "Setting up Search Console on WordPress"
// 01 - the choice

Domain property or URL prefix: which one do I pick?

I pick a Domain property whenever I can get into the DNS. Search Console is the first thing I ask for when someone wants to hire me to fix indexing in Search Console, because it's the read-only data every diagnosis starts from, and a property that only sees half the site gives half the answer. Google's own help says a Domain property includes all subdomains, like m and www, and multiple protocols, so http, https, www and non-www all report into one place.

A URL-prefix property is narrower. It includes only URLs that start with the exact prefix you type, protocol included, so https://example.com/ and https://www.example.com/ are two different properties. That isn't always wrong. It's just blind to anything outside the prefix, and on WordPress the thing outside the prefix is often the problem.

Here's a case where it mattered. On a vacation rental site, Search Console reported the www and non-www homepages as two separate pages, with ranking signals split across both. A property that only saw one host would've shown half of that split and hidden the rest.

The two property types side by side
What differsDomain propertyURL-prefix property
What it coversEvery subdomain and protocol of the domainOnly URLs starting with the exact prefix
How it's verifiedA DNS record, and only a DNS recordHTML tag, HTML file, Google Analytics, Tag Manager or DNS
What can break itSomeone deleting the DNS recordA plugin, theme or file that held the token being removed
When I use itWhenever I can get the DNS editedWhen the DNS can't be touched yet
// 02 - the method

How I handle Google Search Console verification with DNS

It's a short job once you know where the domain's DNS actually lives. This is the order I follow, and it doesn't change between hosts.

  1. Step 01

    Add the property as a Domain

    To add a website to Google Search Console, I click Add property, choose Domain and type the bare domain, like example.com, with no https, no www and no path. The protocol and subdomains are what the property covers, so they don't belong in the box.

  2. Step 02

    Copy the TXT record Google gives

    Search Console shows a TXT record that starts google-site-verification=. I copy the whole value, since a record missing even one character won't verify.

  3. Step 03

    Find where the DNS is really managed

    The company the domain was bought from isn't always the one serving its DNS. I check the nameservers first. If they point at a CDN or the web host, that's where the record goes, and editing the registrar's panel does nothing.

  4. Step 04

    Add the TXT record at the root

    Google says to leave the name or host field blank for a TXT record, and most DNS panels label that root @. A new TXT record sits beside the ones already there, so the mail records don't need touching.

  5. Step 05

    Check the record is live, then click Verify

    Google says a manually added record can take up to two or three days before the provider starts serving it. I look the TXT record up myself before clicking Verify, so a failed attempt tells me something I didn't already know.

  6. Step 06

    Leave the record in place

    Search Console checks the token again from time to time. If it's gone, Google sends a warning, and the permission lapses after a grace period unless the token comes back. I tell whoever manages the DNS what the record's for, so nobody tidies it away in a year's time.

Once the property is verified, the first tool I open on a problem page is URL Inspection, because it shows what Google holds for that one address.

// pro tip

Google also accepts a CNAME record for Domain verification. I only use it when the DNS panel won't take the TXT record, which is rare.

// 03 - the plugins

Can a WordPress plugin handle Search Console verification?

Yes, for a URL-prefix property, and it's the route most WordPress owners take. Each of the four plugins below puts Google's token on the site for you. None of them can verify a Domain property, because that only takes a DNS record.

Where each plugin keeps the verification, and what removing it does
PluginWhere the setting isMethodIf the plugin is removed
Site Kit by GoogleSign in with Google during setupA virtual HTML file first, an HTML tag if that failsThe token goes with the plugin
Yoast SEOYoast SEO, Settings, Site connections, under GoogleHTML tagThe tag goes, and so does verification after the grace period
Rank MathGeneral Settings, Webmaster Tools, Google Search Console fieldHTML tagSame as Yoast
SEOPressSEO, Advanced, Advanced tab, Google site verificationHTML tagSame as Yoast

That last column is the catch none of the plugin guides dwell on. Switch from Yoast to Rank Math, or tidy up plugins, and the token leaves with the old one. So if a plugin verified the site, I paste the same tag into the new plugin before removing the old one, and I still add the Domain property by DNS when I can. To see which methods a property uses, open Settings, then Ownership verification.

If I can't edit the DNS yet, I still add a URL-prefix property today, because Google says data collection starts as soon as anyone adds a property. The prefix has to be the version the site actually serves. If http redirects to https and www redirects to the bare domain, I add https://example.com/ and nothing else, then add the Domain property beside it once the DNS is open.

// watch out

Don't overwrite someone else's token. If a previous developer verified the site, their tag or file keeps them verified too. Add yours beside it, and remove theirs on purpose, not by accident.

Rather have me do this? One person, whole job.

Book a call on Upwork
// 04 - the errors

Why does Google Search Console verification fail?

Google's help page lists errors for each method. These are the ones I actually meet on WordPress, with the check I run for each.

  1. i.

    The TXT record wasn't found

    Google says it can take a few minutes or even days after posting the record for Google to see it, and to wait a day or two. First I check the record went in at the DNS host the nameservers point to, not the registrar.

  2. ii.

    The record didn't match

    Google needs the exact value it gave you, in the value field with the host left blank. A string typed into the host field, or pasted with a missing character, fails here.

  3. iii.

    The meta tag wasn't found

    Google looks for the tag in the head of the homepage a logged-out visitor is sent to. On WordPress I view that page's source logged out, because a cache plugin can keep serving HTML from before the tag was added.

  4. iv.

    The server timed out or looped

    Timeouts, DNS lookup errors and a request redirected too many times all appear on Google's list. A slow host or a www and https redirect chain is where I look.

  5. v.

    The site asked for a password

    Google says a site that requires password authentication can return an invalid response. A coming soon or maintenance mode plugin does exactly that, so I switch it off or use DNS.

// 05 - safe access

How do I give a consultant access without sharing a password?

You add them as a user in Search Console. Nobody needs your Google password, your WordPress login or owner rights to read the data. This is exactly how my diagnosis starts: a restricted user on your property, and you can remove it any time.

Only an owner can add users. In Search Console that's Settings, then Users and permissions, then Add user. You type the consultant's Google Account email, choose the level and save. To take access away, you click Remove access beside their name.

Search Console's permission levels, and which one I ask for
LevelWhat it can doDo I ask for it?
OwnerEverything, including adding and removing other usersNo. I don't need it to diagnose anything
Full userViews all data and can take some actionsOnly if we agree I'll be doing the fixes
Restricted userViews most data, can't change settings or usersYes. It's all a diagnosis needs

Be careful with delegated owners. Google gives a delegated owner owner-level permissions, so they can add and remove users and change settings. I won't ask for that. If nobody at the business is an owner, because a former developer set the property up under their own account, verify it yourself with your own DNS record and you become an owner alongside them.

// 06 - after verifying

What do I set up in the first ten minutes after verifying?

Verification only proves who owns the site. These are the checks that make the property useful, and each one takes a minute or two.

  1. i.

    Submit the sitemap

    WordPress has published a core sitemap at /wp-sitemap.xml since version 5.5. If an SEO plugin writes its own, I submit that one instead, never both. The status should read Success. Couldn't fetch, or a count of errors, is the moment to fix a sitemap Google can't read. If you'd rather rule out a robots.txt block yourself first, my WordPress robots.txt guide shows how to read the file and the Sitemap line inside it.

  2. ii.

    Confirm search engines aren't discouraged

    WordPress turns its core sitemaps off when the Discourage search engines setting is on. It's often ticked during a build and forgotten, and a missing sitemap is sometimes the first clue.

  3. iii.

    Inspect the homepage

    URL Inspection on the homepage shows which version Google treats as the canonical one. If it names www and the site redirects to non-www, that's worth knowing on day one, not month six.

  4. iv.

    Add the people who need to read it

    A restricted user for the consultant, and another owner inside the business if there's only one. A property with a single owner who's since left is a common and avoidable mess.

  5. v.

    Write down the date

    Google says data collection starts as soon as anyone adds a property, even before it's verified. I note that date beside the sitemap URL and the verification method, so the next person knows where the history begins.

  6. vi.

    Leave the Pages report for later

    It fills in as Google crawls. When it does, statuses like Discovered, currently not indexed have their own diagnosis, and it isn't one you'll need in the first ten minutes.

// when to hand this over

If your property's set up and you'd like someone to read what it's telling you, add me as a restricted user and I'll start from there. I don't need a password, and you can take the access back whenever you like.

Book a call on Upwork

Is this your site? Send me the URL.

Book a call on Upwork
// questions - indexing

What else do people ask about this?

How do I get the Google verification code in Search Console?

Add the property first. For a Domain property, Search Console shows a TXT record starting google-site-verification= to add in your DNS. For a URL-prefix property, open the HTML tag method and copy the meta tag, which is what Yoast, Rank Math and SEOPress ask you to paste.

How long does Google Search Console verification take?

The Verify click itself is quick once Google can read the token. The wait is DNS: Google says a manually added record can take up to two or three days before your provider starts serving it, so I check the record's live before clicking Verify.

How long does Search Console validation take?

That's a different clock. After you fix an issue in the Page indexing report and click Validate fix, Google says validation typically takes up to about two weeks, and in some cases much longer. Don't click Validate fix again while it's running.

Should I give my SEO consultant owner access?

No. A restricted user reads most of the data and can't change settings or add people. Owners and delegated owners can add and remove users and change settings, so keep ownership inside the business.

Will adding my site to Search Console get it indexed?

Not by itself. Search Console reports what Google does with the site, and even a submitted sitemap doesn't mean every URL gets crawled. Google says crawling depends on the site's size, activity and traffic.

// sources - checked

Where do these rules come from?

Platform and Google documentation, opened and read on the day this was written. Everything else is how I work.

  1. Search Console Help: verify your site ownership
  2. Search Console Help: add a website property
  3. Search Console Help: managing owners, users and permissions
  4. Search Console Help: manage your sitemaps using the Sitemaps report
  5. Search Console Help: Page indexing report and fix validation
  6. Site Kit by Google documentation: Search Console
  7. Yoast help center: how to add your website to Google Search Console
  8. Rank Math knowledge base: General Settings, Webmaster Tools
  9. SEOPress: add your site to Google Search Console
  10. Make WordPress Core: new XML sitemaps functionality in WordPress 5.5
Muhammad Younus, WordPress technical SEO consultant
// who wrote this

One consultant, writing down his own method

I'm Muhammad Younus, a WordPress technical SEO consultant with 8+ years of experience and 100+ client sites fixed. Top Rated Plus on Upwork with a 100% Job Success Score. Every post here is the way I actually do the job, written in the first person because it's one person doing it, remotely, with no team behind the name.

Nothing in these posts is a client I can't name or a number I can't show. Where a figure comes from a client's Search Console, it's from a published case study, and where a rule comes from Google or a platform, the source is linked at the bottom of the post.

// the service behind this post
Muhammad Younus laughing, a wide genuine smile
// next step

Want this done on your own site?

Book a call on Upwork, send the URL and read-only Search Console access, and you'll get a written scope for the search side before any work starts. One person does the whole job, remotely.

Book a call on Upwork