Integrating ad code into your website should be a simple task, but small technical oversights can lead to a complete loss of revenue. When your ads don’t show or your account remains in a “getting ready” state for weeks, it’s usually due to a few common errors.
Here is a guide to the most frequent technical mistakes and how to fix them manually.
1. The ads.txt File Missing or Misconfigured
The ads.txt file is a small text file you host on your server. It tells advertisers that you are the authorized seller of your ad space. If this file is missing or contains a typo, advertisers will not bid on your site.
The “Not Found” Error: Ensure your file is located at the root of your domain (e.g., example.com/ads.txt). If you put it in a folder like example.com/assets/ads.txt, the crawlers will never find it.
Formatting Mistakes: The code inside must be exactly as provided in your account. A single extra space or a comma instead of a period can invalidate the entire file.
The “www” vs. Root Problem: If your site uses “www”, make sure the ads.txt file is accessible at both the “www” and non-www versions of your URL.
2. Broken or Incomplete Ad Code
When you copy the ad snippet from your dashboard, it is easy to accidentally leave out a single character. This is one of the most common reasons for ads not appearing.
Truncated Code: If you use a website builder or a specific plugin, the code might get “cleaned” or shortened automatically. Always check your page source code (right-click on your page and select View Page Source) to ensure the <script> and <ins> tags are fully intact.
Multiple Injections: If you are using “Auto Ads,” you only need the header code once. Some users mistakenly paste the code into the header and then add it again into a widget or a plugin. This can cause the scripts to clash, leading to blank ad spaces.
3. Crawler Access Blocked by Robots.txt
Even if your site is live and your code is perfect, ads will not show if the ad crawlers cannot see your content. These crawlers visit your site to understand what your pages are about so they can show relevant ads.
The Robots.txt Trap: Check your robots.txt file. If you have a line that says Disallow: /, you are telling all bots to stay away.
How to Fix: Ensure you are not blocking the specific user-agents used for ad crawling. You can manually add these lines to your robots.txt to ensure they have access:
User-agent: Mediapartners-Google
Disallow:
4. Privacy and Consent Framework Errors
In 2026, privacy regulations are stricter than ever. If you have visitors from regions like the EU or specific US states, you must have a proper consent banner.
TCF v2.2 and v2.3 Compliance: If your Consent Management Platform (CMP) is not configured correctly or is outdated, the ad system will stop serving ads to those users because it lacks the “signal” that the user agreed to see ads.
The Fix: Go to your privacy and messaging settings. Ensure your consent banner is active and that your CMP is on the list of approved providers.
5. Mobile Layout and Container Width Issues
Sometimes ads are working perfectly, but they are invisible because the “container” on your website is too small.
Width Errors: If you use responsive ad units, they need a minimum width to display. If your website sidebar is only 200 pixels wide and the ad requires 250 pixels, the ad will simply not render.
The “availableWidth=0” Error: This often happens when an ad is placed inside a hidden element or a container that expands only after the page loads. The ad script tries to calculate the width, finds “0”, and gives up.
Troubleshooting Checklist
| Error Type | What to Check |
| Ads not showing at all | Check your ads.txt status in your dashboard. |
| Blank white spaces | Look at your browser’s console (F12) for “403” or “crawler” errors. |
| Ads show on desktop but not mobile | Check if your mobile theme has a different header file where the code might be missing. |
| “Site not reached” | Ensure your server is not blocking Google IP ranges via a firewall. |