Can you use Adsense behind a DigitalOcean Load Balancer?

I’d like to know if the health checks from a DigitalOcean Load Balancer might cause Adsense to think I’m inflating my page views.

I assume the answer is no, but I just want to be 100% certain before I place ads on my website because I don’t want to get banned from Adsense.

I only ask because Load Balancer health checks appear as page views in my Discourse analytics.

Thanks in advance! Francis


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey @francis1 good question.

Based on everything I know about Load Balancers and AdSense, I would say:

It is fine to use AdSense on a site that is behind a DO Load Balancer, LB health checks will have no affect on AdSense.

Load Balancer health checks are just requesting a URI and confirming that the HTTP response code is 200.

AdSense doesn’t even start running until:

  1. A Browser makes a request to a URI
  2. The browser renders the HTML of the page
  3. The browser downloads all included JS and CSS referenced on the page, including AdSense JS
  4. The browser executes the AdSense JS, resulting in more requests to Google servers.

Load Balancers never even get past step 1, so the health checks are completely invisible to AdSense.

Also, cool to hear you managed to set up load balanced Discourse, if you have the interest, you should do a write-up of how you set that up and share it with us!