AdSense on WordPress: Setup, Plugins and Rejection Traps
Approvalens · Updated October 4, 2026 · 6 min read
A self-hosted WordPress site can apply for AdSense like any other site. You add the verification code to the <head> (by hand or with a plugin like Site Kit by Google), make sure Google's crawlers can reach the pages, and submit the domain. Most WordPress rejections don't come from WordPress itself. They come from leftovers and settings: "Hello world!" posts, a "Discourage search engines" box someone forgot to untick, a security plugin that blocks bots, or hundreds of thin tag pages.
WordPress.org vs WordPress.com
These are two different situations.
- WordPress.org (self-hosted). You control the theme, plugins and server, so you can add code to
<head>and uploadads.txtto the root. AdSense requires exactly that: "you must have access to the HTML source code of your site" (owning the site). - WordPress.com (hosted). Whether you can add the AdSense code depends on your plan. Plans that allow plugins or custom code can. Lower plans usually can't, and WordPress.com points you to its own WordAds program instead. Check the current plan page before you apply, because plan names and limits change.
The rest of this guide assumes a self-hosted site.
Where the code goes
AdSense gives you three ways to verify a site: the AdSense script, an ads.txt line, or a meta tag (connect your site). On WordPress, pick one of these methods:
| Method | Pros | Watch out for |
|---|---|---|
| Site Kit by Google plugin | Official, connects your account, places the snippet for you | Adds several modules. Turn on only what you use |
| A header-code plugin (e.g. WPCode) | Survives theme updates | Make sure it outputs in <head>, not the footer |
Editing header.php in a child theme |
No extra plugin | Editing the parent theme gets wiped on update |
| An ad-management plugin (Advanced Ads, Ad Inserter) | Also manages placements and ads.txt | Don't let it insert "Click here" style labels |
The snippet looks like this, with your own ID:
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234567890123456" crossorigin="anonymous"></script>
Check the page source (not the browser inspector) of your home page and one post. The script should appear once, inside <head>. Caching and optimization plugins sometimes delay or combine scripts. That's usually fine for verification, but if verification fails, exclude adsbygoogle.js from "delay JavaScript" settings.
ads.txt on WordPress
ads.txt is optional. If you add one, it must sit at the root (https://example.com/ads.txt) and contain your line:
google.com, pub-1234567890123456, DIRECT, f08c47fec0942fa0
You can upload a plain text file through your host's file manager, or let an ad plugin serve it. Three WordPress-specific traps:
- The file is in a subfolder. WordPress installed under
/blog/doesn't move ads.txt to the root. Google only reads/ads.txton the root domain. - A plugin serves it as HTML. Open the URL and view the source. If you see
<html>or a theme header, the crawler sees a broken file. - Two plugins compete. An SEO plugin and an ad plugin both try to manage ads.txt, and the static file overrides one of them. Keep a single source.
The ads.txt setup guide covers formatting and status codes.
Settings that quietly block crawlers
Check these before you apply:
- Settings → Reading → "Discourage search engines from indexing this site". When it's ticked, WordPress adds a
noindexrobots meta tag and its virtual robots.txt returnsUser-agent: */Disallow: /. Mediapartners-Google ignores the*group, but Googlebot doesn't, and Google may disable ads on content it cannot evaluate. Untick it. - Maintenance or "coming soon" plugins. They often return HTTP 503 to everyone who isn't logged in, including AdSense's crawler. The site then looks down. Turn them off before you submit.
- Security and firewall plugins. Rate limits, country blocks and "block unknown bots" rules can return 403 to Google. Allow verified Google crawlers, and check your host's firewall as well. Cloudflare in front of WordPress has its own set of issues.
- A physical robots.txt from an old SEO plugin. A real
robots.txtfile overrides WordPress's virtual one. Openexample.com/robots.txtand read every line. - Login walls. Membership plugins that hide all posts behind a login leave the reviewer with nothing to evaluate. AdSense asks you to "consider temporarily removing the login" (site not ready).
Leftover and thin pages WordPress creates
WordPress generates many URLs you never wrote. Google's low-value content policy is about screens "without publisher-content or with low-value content", so clean these up:
- Default content. Delete the "Hello world!" post, the "Sample Page" and the sample comment. Approvalens flags these because they're a reliable sign of an unfinished site.
- The draft privacy page. WordPress creates a "Privacy Policy" draft. It's a generic template. Rewrite it to include the AdSense statements about Google's cookies and opt-out, publish it and link it in the footer. The privacy policy guide has the wording.
- Tag archives. Fifty tags with one post each produce fifty near-empty listing pages. Merge tags, or set tag archives to
noindexin your SEO plugin. - Author and date archives on a one-author blog. These duplicate the main blog listing. Most SEO plugins can disable them.
- Attachment pages. Since WordPress 6.4, new installs redirect attachment URLs to the file. Older sites may still have thousands of image-only pages. Enable the redirect in your SEO plugin.
- Uncategorized. A category called "Uncategorized" holding half your posts makes the site look unplanned. Rename it and sort your posts.
Comments, forms and other plugins
- Comment spam. You're responsible for user content on pages with ads. Google says you "need to moderate your comment section" (site pages ready). Hold the first comment from every new author for moderation and turn on an anti-spam plugin.
- Pop-up plugins. Newsletter pop-ups aren't ads, but a full-screen modal on the first second of a mobile visit gets in the way of reading. Delay them or use a slide-in.
- Other ad networks. If you already run a network that uses pop-unders or push notifications, remove it before applying. Pop-unders aren't allowed on pages with Google ads.
- Consent. If you use a cookie plugin like Complianz or CookieYes for EEA visitors, enable TCF mode. See the CMP guide.
WordPress pre-application checklist
- AdSense snippet appears once in
<head>in the page source - "Discourage search engines" is unticked
- No maintenance or coming-soon mode
- robots.txt has no
Disallow: /for*, Googlebot or Mediapartners-Google - ads.txt (if used) is at the root, served as plain text, with your
pub-line - "Hello world!", "Sample Page" and the sample comment are gone
- Privacy policy is rewritten, published and linked
- Thin tag, date, author and attachment pages are merged, redirected or noindexed
- Comments are moderated
The full list is on the approval checklist.
Scan your WordPress site
The free Approvalens scan crawls up to 5,000 pages from your home page and flags WordPress leftovers, blocked crawlers and thin archives in a few minutes.
FAQ
Is Site Kit required to get AdSense on WordPress?
No. It's a convenient official plugin, but any method that puts the snippet in <head> or uses the meta tag or ads.txt works for verification.
Should I install an AdSense plugin before approval?
You only need the verification code before approval. Ad-placement plugins become useful after your site is marked Ready.
My theme has a demo homepage. Is that a problem?
Yes, if demo text, stock "Lorem ipsum" sections or fake testimonials are still visible. Replace them with your own content or remove them.
Can I keep my tag pages?
Yes. Just make sure they're useful (several posts each) or set to noindex. Hundreds of one-post tag pages add nothing for readers.
Does WordPress.com's free plan work with AdSense?
Generally no, because you can't add custom code to the head on that plan. Check WordPress.com's current plans for code and plugin access.
Check your own site
Free scan: readiness score and every issue, usually in a few minutes.