Search...

Google AdSense problem with ads not showing

My website AdSense ads had stopped showing (displaying). For a couple of days. How did I solve this problem?
How to add Google AdSense ads to a WordPress website

The first thing I did was press the F12 key in Chrome and look at the Network tab, looking for the “ads?” string. Here’s what that’s supposed to look like:

"ads?" tag search when all's well
“ads?” tag search when all’s well
Picture 1

However, now that was not the case. I could see no “ads?” tag shown. So I went to the “Console” tab of my Chrome browser (again, after having pressed the “F12” button and refreshed the page), to see this:

Error code that I saw
Error code that I saw
Picture 2

Here’s the code, with my publisher ID removed only:

Refused to execute script from 'https://io.bikegremlin.com/wp-content/litespeed/localres/aHR0cHM6Ly9wYWdlYWQyLmdvb2dsZXN5bmRpY2F0aW9uLmNvbS9wYWdlYWQvanMvadsbygoogle.js?client=ca-pub-XXXXXXXXXXXX' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Well, as you can (hopefully) see from picture 2, I suspected the LiteSpeed plugin right away. It hasn’t been the first time that a LiteSpeed update has caused me problems.

Now, let me see: LiteSpeed plugin published an update some 3 days ago (how to install and configure LiteSpeed for WordPress). After testing on a staging environment (without any AdSense ads), I updated my websites the next day. And, what do you know, that’s when the ads had stopped displaying.

So what I did was just disable the LiteSpeed plugin. First flushing its cache, just for a good measure.

Purging LiteSpeed cache, just in case
Purging LiteSpeed cache, just in case
Picture 3
Deactivating the LiteSpeed plugin
Deactivating the LiteSpeed plugin
Picture 4

That’s it, job done.

Hope this helped. 🙂
Yes, a Solomon’s solution, while waiting for a proper fix. Here’s the relevant topic on the LiteSpeed support forum.

Update: LiteSpeed support suggested a solution. Disabling the “Localize Resources” option seems to do the trick. Will test this further, but so far so good. 🙂

Solution for showing the Google AdSense ads properly with the current LiteSpeed cache version (update)
Solution for showing the Google AdSense ads properly with the current LiteSpeed cache version (update)
Picture 5


SOLVED! 🙂

I’ve found how to keep the localization of various files, but with Google AdSense ads working normally. Here’s the solution:

Comment out (using the "#" character) the pagead2.... line - and it will work again! :)
Comment out (using the “#” character) the pagead2…. line – and it will work again! 🙂
Picture 6

Just make sure to delete the cache (picture 3).

2 thoughts on “Google AdSense problem with ads not showing”

Comments are closed.


Please use the BikeGremlin.net forum for any comments or questions.

If you've found any errors or lacking information in the article(s) - please let me know by commenting on the BikeGremlin forum.
You can comment anonymously (by registering with any name/nickname), but I think it is good to publicly document all the article additions (and especially corrections) - even if their author chooses to remain anonymous.

Tools and other products that I use (and can recommend)

Skip to content