AdSense Site Verification: Tag, Code, or ads.txt
AdSense site verification methods explained: ad code snippet, meta tag, and ads.txt—what each is for, when to pick one, and how that differs from Search Console HTML file or DNS.

When AdSense asks you to verify or connect a site, the real question is Tag-Or-File style: do you place something in HTML (code or meta tag), or publish a root file (ads.txt)? Mixing that with Search Console’s HTML file / DNS options creates false tutorials and failed verifies.
This page is Tag-Or-File for AdSense’s documented connect methods. It is not host vs subdomain when adding a site (which hostname to add—early-link it). It is not add a new site after approval (Site-Then-Verify how-to after you already have an account). It is not AdSense approval checklist (before-apply content gate).
Choose one AdSense method your account offers (code snippet, meta tag, or ads.txt), publish it on the exact host you added, then verify and request review. Confirm live Help—do not invent UI screenshots.
Official: Connect your site to AdSense · Add a new site to your AdSense sites list · ads.txt guide.
Disclosure: Educational summary of public Help. Methods and menus change. We cannot verify your site for you or promise approval.
Table of contents
- Tag-Or-File for AdSense
- Method A — AdSense code snippet
- Method B — Meta tag
- Method C — ads.txt file
- Not the same as Search Console HTML file / DNS
- Pick hostname before you paste anything
- Verification fails: check these first
- FAQ
- Publish one method, then wait for review
Tag-Or-File for AdSense
TAG-OR-FILE (ADSENSE)
1. HOST → decide apex vs www / subdomain (host-vs-subdomain)
2. ADD SITE → correct URL in AdSense Sites
3. METHOD → code snippet OR meta tag OR ads.txt (confirm account options)
4. PUBLISH → live HTML head or root ads.txt
5. VERIFY → checkbox + Verify in AdSense
6. REVIEW → Request review; wait (often days, sometimes longer)
Help describes selecting a verification method when connecting the site, then confirming placement and verifying. Exact button names can differ by account surface—always follow what AdSense shows you that day.
Method A — AdSense code snippet
What it is: The AdSense script/snippet pasted into your page HTML between the <head> tags (Help’s connect article). Place it on pages where you intend ads to appear; Help stresses putting code where crawlers and visitors can reach it.
When it fits:
- You are ready for ad code on the site
- Your CMS or theme supports a sitewide head injection
- You want one snippet that both connects and prepares serving
Watch-outs: Wrong site URL, code only on a draft/staging host, or code behind a login will fail. WordPress users should follow AdSense’s WordPress guidance rather than random plugin myths.
Method B — Meta tag
What it is: A <meta name="google-adsense-account" content="ca-pub-…"> style tag in the document head (confirm the exact snippet AdSense gives you).
When it fits:
- Help’s note applies: you may not want the full ad code on the homepage yet
- You can edit head HTML but prefer a lighter footprint during connect
Watch-outs: Meta tag still must be published on the live host AdSense is checking. A tag only in a local file editor does nothing.
Method C — ads.txt file
What it is: A root-level ads.txt file (for example https://example.com/ads.txt) containing the publisher line AdSense provides—Help shows a google.com, pub-…, DIRECT, … pattern. Upload to the root directory of the site you added.
When it fits:
- AdSense offers ads.txt as a verification option for your site
- You can deploy a plain text file at the domain root
- You already maintain ads.txt for authorization hygiene
Watch-outs: Root means site root—not a random /blog/ folder. After ads are live, ads.txt status (Authorized / issues) is a separate ongoing job from first connect. Do not confuse “file uploaded once” with forever-perfect authorization.
This is the AdSense file path in Tag-Or-File terms—not a Search Console HTML file upload unless your account literally shows that option (confirm; do not invent it).
Not the same as Search Console HTML file / DNS
| Method family | Typical product | Role |
|---|---|---|
| AdSense code snippet | AdSense | Connect / ownership for ads |
| AdSense meta tag | AdSense | Alternate HTML head proof |
| ads.txt snippet | AdSense (+ ongoing auth) | File at site root |
| HTML file upload / DNS TXT | Often Search Console | Search property verification |
Publishers frequently paste Search Console DNS steps into an AdSense thread. If AdSense did not offer that method on your connect card, it will not verify ownership for ads. Stick to methods listed in Connect your site and your live UI.
Pick hostname before you paste anything
Verification fails when the snippet lives on www while Sites lists the apex—or the reverse. Settle strategy on host vs subdomain when adding a site first.
Adding another property after you already earn on one site is add a new site after approval—still verify ownership, then wait for review. Content readiness before first apply remains the approval checklist.
Verification fails: check these first
From AdSense Connection issues themes (confirm live Help):
- Snippet incomplete or outside
<head> - Published on a different URL than the one in Sites
- Site offline, password-gated, or blocking AdSense crawlers in robots.txt
- Changes not actually deployed (CDN/cache still serving old HTML)
- Try another verification method AdSense offers if one keeps failing
Do not remove and re-add the site in a panic loop while review is already pending—that is a different life stage (see review-time / Prep-Or-Wait routers elsewhere).
FAQ
What verification methods does AdSense offer when connecting a site?
Help documents code snippet, meta tag, and ads.txt among connect options. Confirm what your account lists today.
Is AdSense verification the same as Google Search Console HTML file or DNS?
No—different products. Do not assume Search Console methods appear in AdSense.
When should I use the meta tag instead of the full ad code snippet?
When Help’s use case fits (for example avoiding full code on the homepage) and you can still publish a crawlable head tag.
Does ads.txt alone finish site review?
It can verify ownership as a method, but review still evaluates policy compliance. ads.txt also matters later for authorization status.
I already have AdSense approval—why verify again?
New sites need their own ownership/verification + review. See add a new site.
What if verification fails?
Fix publish/crawl issues; match the host; try another offered method. Follow Connection issues Help.
Should www and non-www use different verification?
Pick one host strategy first (host vs subdomain), then verify that exact host.
Where is the official AdSense documentation?
Connect your site and Add a new site. Re-read before you paste.
Publish one method, then wait for review
Tag-Or-File for AdSense means: pick code snippet or meta tag (HTML head) or ads.txt (root file), publish on the hostname you added, verify in AdSense, then request review. Settle host vs subdomain first; use add a new site after approval when expanding an existing account; keep content prep on the approval checklist. Confirm live Google Help—no invented screenshots, no Search Console DNS masquerading as AdSense.
Keep learning
More guides in the same topic lane.
PDF to Text or PDF to Word: Which Job?
Need copy-paste plain text from a PDF or an editable Word file? Choose PDF to Text vs PDF to Word before upload—format, cleanup, and live tool links.
JPG to PDF or Protect PDF: Which Job First?
Photos still need a PDF packet, or the PDF only needs a password? Route JPG stacks vs Protect PDF before you lock the wrong file or skip the build step.
GSC Page Indexing or Sitemaps Report: Which First?
Page indexing explains why URLs are in or out of Google search. Sitemaps checks whether Google read your XML file—use this guide to pick the right GSC report.