Troubleshoot and resolve common issues
How to check if your ad code has been modified
Modifying your AdSense ad code is not only against our program policies, but it may also result in errors on your site such as ads showing incorrectly, or not showing at all.
If the ads on your site are not serving, or they're serving incorrectly, you might want to check that your ad code is implemented correctly. You can do this by following these steps:
- Open a code comparison tool. If you don't already use one, we recommend you do a Google search for "code comparison tool”, then select one of the many free options.
- Open the source code of your site and locate the ad code that's not serving ads correctly.
To locate the ad code, try searching for either the ID of the ad unit, e.g., 1234567890, or your publisher ID, e.g., pub-1234567891234567.
- Copy the ad code and paste it into the first text box in your code comparison tool.
Note that the ad code should begin with
<script async src=if you're using asynchronous ad code, or
- On the My ads page in your AdSense account, find the ad unit that you're having a problem with and click Get code. The "Ad code" box containing the ad unit's ad code loads.
- Copy the ad code and paste it into the second text box in your code comparison tool.
- Click the compare button in your code comparison tool and review the results.
Checking the results in your code comparison tool
If your ad code has been implemented correctly, you typically won't see any differences highlighted by the code comparison tool. If you're still having issues with your ads, please refer to our ads troubleshooter for more help.
If your ad code hasn’t been implemented correctly, you'll typically see the differences highlighted by the code comparison tool. For example, you might see differences in your ad code such as:
- Your ad code does not appear in its entirety, e.g., there's a missing
- Your ad code displays all on one line.
- Your ad code has extra HTML tags within it.
- The variables in your ad code (such as
google_page_url) have been renamed or changed.
Fixing issues with your ad code
You can fix any modification errors you find in your ad code by following these steps:
- Remove the ad code that's not serving ads correctly from your site.
- Copy and paste the correct ad code from your AdSense account.
After you've correctly implemented your ad code, ads will begin serving within 48 hours (provided that your account status is active, and your site is policy compliant).