4

I have a website that runs on Apache 2 and has code in PHP and JS + HTML.

This is the code of my ad unit:

I have an approved AdSense account that already was showing (and getting revenue) from AdMob ads since months.

I created an AdSense ad unit and placed it on that website but it is not appearing.

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 728x90_leaderboard -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-xxxxxx"
     data-ad-slot="xxxxxx"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

What can be the problem? There are no errors showing in debug console.

  • I wish I had an answer for you. Cheers!! – closetnoc May 22 '16 at 2:02
  • If it can be useful, my account is not banned neither I use an adblocker. – ctatti May 22 '16 at 4:53
  • Lots of ads are showing up on this site currently (a month after you posted this question.) – Tony DiNitto Jun 25 '16 at 22:45
  • 1
    I recommend turning on "public service" ads to start with. Even if Google doesn't find any paying ads to show, at least you know that the setup is correct when you see the public service ads. – Stephen Ostermiller Jul 20 '16 at 14:39
1

After you create the ad unit, it takes sometime to be activated.

So, it'll automatically start showing ads after some time.

  • How long is "some time"? A few hours / days / weeks? – Tony DiNitto Jun 25 '16 at 22:20
  • Usually a few hours, sometimes a couple days. I've never seen it take weeks. – Stephen Ostermiller Jul 20 '16 at 14:37
  • This is true but I consider this is not the right answer because ads are also not showing on old pages that already shown the ad(s) at some point. – adrianTNT Apr 18 at 14:15
1

Google AdSense also requires an ads.txt file for your website. If you go login to the AdSense site it will tell you if this is the cause of your error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.