Adding Ads (Google AdSense)
Turning Traffic Into Revenue
Google AdSense lets website owners display ads and earn revenue based on impressions and clicks, making it a common first monetisation step for content sites.
Setting Up AdSense on WordPress
Apply for a Google AdSense account and wait for site approval, which typically requires original content and enough traffic.
Once approved, add your AdSense code using a plugin like Ad Inserter or Site Kit by Google, rather than editing theme files directly.
Placing Ads Effectively
Common ad placements include within post content, in the sidebar, and just below the header, balanced against user experience.
Avoid excessive ad density, since too many ads can hurt both user experience and search engine rankings.
| Placement | Typical Performance | Note |
|---|---|---|
| In-content | High visibility, good CTR | Best placed after the first paragraph |
| Sidebar | Moderate visibility | Good for supplementary ads |
| Below header | High visibility | Use sparingly to avoid annoying visitors |
AdSense isn't the only monetisation route — affiliate marketing is another popular way to earn from your WordPress content.
Connecting AdSense With Site Kit, Step by Step
- Install and activate the Site Kit by Google plugin from Plugins > Add New.
- Run the setup wizard and sign in with the Google account that owns, or will own, the AdSense account.
- Choose AdSense from the list of services. Site Kit can place the verification code on your pages, so you do not need to touch theme files.
- In your AdSense dashboard, add the site if it is not listed and wait for the review to finish.
- After approval, decide between Auto ads, where Google chooses placements, and manual ad units that you place yourself with a plugin such as Ad Inserter or with block widgets.
Many site owners start with Auto ads to see where they appear, then switch off formats that feel intrusive and add a few manual units in places they control.
Adding the ads.txt File
An ads.txt file tells advertisers which companies are allowed to sell ads on your domain. AdSense shows a warning until it can find one at the root of your site. It contains a single line for AdSense, using your own publisher ID:
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
Site Kit or an ads.txt plugin can create it for you. If you upload it by hand, make sure it opens at yourdomain.com/ads.txt, not inside a subfolder.
Keeping Pages Fast and Visitors Happy
Ads load extra scripts, so they can slow a page and make content jump around while it loads. A few habits keep that under control:
- Reserve space for each manual ad slot with a fixed minimum height in your theme CSS, so text does not shift when the ad appears.
- Limit units per page, especially above the fold on mobile, where one large ad can push the actual content off screen.
- Test on a phone after every change; most visitors on content sites browse on mobile.
- Exclude ads from pages that should feel clean, such as contact, checkout or login pages.
- Check caching and optimisation plugins; delaying or combining Google scripts can sometimes stop ads from showing.
Staying Within the Rules
AdSense accounts can be limited or closed for policy problems, so treat the programme policies as part of the setup, not an afterthought. Never click your own ads, even to test them, and never ask visitors to click. Do not place ads where they could be mistaken for menus or download buttons. Content must also meet Google's publisher policies, which exclude things like copied articles and misleading material.
If your site has visitors from regions with strict privacy rules, such as the European Economic Area or the UK, Google requires a consent message from a certified consent management platform. AdSense offers its own privacy messaging tool, or you can use a certified WordPress consent plugin.
Launch checklist: site approved, ads.txt reachable, consent message working where needed, layout stable on mobile, ads hidden on sensitive pages and no accidental self-clicks while testing.
Ready to master WordPress Training Course?
Join Uncodemy's hands-on, mentor-led WordPress training and build real, live websites.