Ever since I installed cloudflare, my site hasn’t been displaying google ads. I only see a yellow square on occasion but 99% of the time I see nothing at all. What can I do to fix this?
Just to start with some basic troubleshooting,
Can you try pausing Cloudflare on the site from the Overview tab of the Cloudflare Dashboard, bottom right under Advanced Actions.
Leave it 5 minutes and see if the issue remains, then click one of the options below for further steps.
Yes, the issue remains
If the issue persists after Cloudflare has been paused, it means that there is an issue with your origin, Cloudflare is only operating as your DNS provider while it is paused.
No, it works after pausing Cloudflare
Ok, re-enable Cloudflare and leave 5 minutes. Then enable ‘Development Mode’, if this fixes it, it’s probably a caching issue. If not, you may need to look at further settings such as Rocket Loader.
If you follow these steps and let us know the outcomes, someone here may be able to offer further assistance.
Pausing cloudflare did indeed cause my ads to re-appear. They also continue to appear in development mode. As you say it’s likely a caching issue… How can this be fixed?
I need my ads to function even while I am being ‘under attack.’
Understood and thank you for following through with those steps.
Do you have any page rules with caching settings such as ‘Cache Everything’?
No, I do not have anything added under page rules.
Hmm… I don’t have access to a desktop right now, so someone else may be able to help more. However, if you look in your browser’s developer tools, do you see any issues?
I am not 100% sure what error/issue I should be looking for but my webhost told me they can’t seen an issue.
From this screenshot it’s possible to see that the page was loaded after a JS Challenge.
@domjh, do you know if this could have anything to do with the supposed problem?
@gfcnieuwsned, if you can, pause Cloudflare again and let me know so I can take a look.
It could potentially have something to do with it, but I’m not sure, I have not used Adsense, and am not sure exactly how it works.
The adverts actually appear OK on my end.
I do see a few comments elsewhere that Adsense doesn’t work on URLs with a query string, but can’t find a source to back that up.
Yesterday I turned off development and under attack mode AND paused CF for a few hours.
But a few hours ago I had to put up under attack mode again due to another attack and the ads seem to be running for now, but not sure if it will stay this way.
This will prevent Google bots - including those related to Adsense - from crawling your pages, so you’ll probably have some problems displaying ads.
I would suggest creating a Firewall Rule that applies Captcha or JS challenge to all requests except those originated by Known Bots. This way you could activate it temporarily when necessary without affecting the crawlers.
Here is a generic example:
The ads seem to be working more often than not now.
Another issue: cloudflare blocks image/link preview when sharing links on facebook.
This topic was automatically closed after 14 days. New replies are no longer allowed.