Getting Started

How to Verify Site Ownership in Google Search Console

Verification proves to Google that you control a site before it will show you that site's private search data. A DNS TXT record is the most durable method and the only one that unlocks a domain property.

7 min read · Updated

Search Console data is private — it reveals what people search before they reach your site, which pages Google distrusts, and where you rank. Google will not hand that to anyone who types in a URL. Verification is the proof step, and it is the first thing that stands between you and any data at all.

Pick your property type first

This decision constrains which verification methods are even available to you, so make it before you start.

  • Domain property — covers every subdomain (www, blog, shop) and both protocols in one dataset. DNS verification is the only method that works.
  • URL-prefix property — covers exactly one prefix, like https://www.example.com/. Accepts all five verification methods.

Method 1 — DNS TXT record (most durable)

  1. Add the property

    In Search Console, open the property dropdown, choose 'Add property', pick 'Domain', and enter your bare domain — example.com, with no https:// and no www.

  2. Copy the TXT record

    Google shows a string that looks like google-site-verification=aBcD1234.... Copy the whole thing.

  3. Add it at your DNS host

    Go to your registrar or DNS provider (Cloudflare, Namecheap, Vercel, Route 53). Create a new record: Type TXT, Name/Host @ (meaning the root domain), Value = the string you copied.

  4. Wait, then verify

    DNS propagation is usually minutes but can take up to 48 hours. Click Verify. If it fails, wait and retry — the record does not expire.

You can confirm the record went live yourself, without waiting on Google, using dig:

dig -t txt example.com +short

If your verification string does not appear in that output, Google cannot see it either, and clicking Verify again will not help. Fix the record first.

Method 2 — HTML file upload

Google gives you a file like google1a2b3c4d5e.html. Upload it to your site's root so it resolves at https://example.com/google1a2b3c4d5e.html, then verify.

On a Next.js project, drop the file straight into public/ — anything in that folder is served from the root. Do not rename it, and do not let a build step minify or rewrite it.

Method 3 — HTML meta tag

Add a meta tag to the <head> of your homepage. In the Next.js App Router you do not hand-write the tag — you use the metadata API, which emits it for you:

// src/app/layout.tsx
export const metadata: Metadata = {
  verification: {
    google: "aBcD1234...", // just the content value, not the whole tag
  },
};

The tag has to be present on the exact URL you are verifying, it has to be inside <head>, and it has to survive into the server-rendered HTML. If you inject it with client-side JavaScript, Google's verifier will not see it.

Methods 4 and 5 — Google Analytics and Tag Manager

MethodRequiresCatch
Google Analyticsedit permission on the GA propertyMust use the gtag.js or analytics.js snippet, in the <head>
Tag Managerpublish permission on the GTM containerNeeds the GTM <noscript> snippet immediately after <body>

Both are convenient and both are fragile. They break the day someone migrates analytics, changes a tag manager container, or moves the snippet into a consent-gated loader. Treat them as a fast path to your first look at the data, then add DNS verification as the permanent one.

Why verification fails

SymptomUsual cause
DNS record 'not found'Wrong Name field (@ vs. full domain), or you have not waited for propagation
Meta tag 'not found'Tag rendered by client-side JS, or added to a page that is not the verified URL
HTML file 404sSPA routing swallowed the request, or the host rewrites unknown paths to index.html
Verified, then unverified laterSomeone removed the record, or you re-platformed and the file/tag did not come along
Redirects during verificationVerifying the apex while the apex 301s to www — verify a domain property instead

After you are verified

Verification unlocks the data but does not populate it — a brand new property starts empty and fills in over the following days. Use that time well: submit a sitemap so Google has a definitive list of URLs to crawl, then check the Page indexing report once data appears.

Frequently asked questions

How long does Search Console verification take?

The HTML file, meta tag, Analytics, and Tag Manager methods verify almost instantly. DNS verification depends on propagation — usually a few minutes, occasionally up to 48 hours. The record does not expire, so you can keep retrying without redoing anything.

Can I verify the same site with more than one method?

Yes, and you should. Multiple verification tokens act as redundancy: if a redesign strips your meta tag, a DNS record keeps the property alive and preserves your history.

Can more than one person be verified on the same property?

Yes. Each owner can verify independently with their own token, and a verified owner can also delegate access to other users from Settings without those users needing a token of their own.

Do I lose my data if verification breaks?

You lose access to the property, not the underlying data. Restore the token and re-verify, and your full history — up to Search Console's 16-month retention limit — is still there.

Keep reading