projectmonkey
projectmonkey

Reputation: 79

How to stop Adsense loading mixed content on https site?

I am getting intermittent mixed content errors on my https site. The site link is stakeholdermap.com

I have checked Chrome Dev tools >Network tab and I am seeing unsecure urls examples below:

Mixed Content: The page at 'https://www.stakeholdermap.com/stakeholder-analysis.html' was loaded over HTTPS, but requested an insecure plugin data 'http://static.vertamedia.com/static/vpaid-ssp-vast.swf?aid=41476&sid=0&cb=146233.42079096.743365'. This content should also be served over HTTPS. ads?client=ca-pub-3370240294319443&format=300x250&output=html&h=250&slotname=8722343817&adk=5159607…

Mixed Content: The page at 'https://www.stakeholdermap.com/stakeholder-analysis.html' was loaded over HTTPS, but requested an insecure plugin data 'http://ads2.vertamedia.com/vast/vpaid-config/?width=300&height=250&aid=4147…takeholdermap.com&v=2.2.90&t=flash&video_duration=&cb=73026784276589750000'. This content should also be served over HTTPS.

But the adslots are using latest code (//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js)

I am pretty certain these are loaded by Adsense. My question is how can I block this or force it to use https?

Upvotes: 1

Views: 1864

Answers (1)

Jim McClain
Jim McClain

Reputation: 36

Ask the users browser to fetch the secure content, if possible: <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" /> If the ad is available via https, then it will fetch that version, otherwise, the content will be blocked and another shown in its place. Put the meta in the <head> section of your pages where all your other meta tags are located.

You can find more information here: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/fixing-mixed-content

Upvotes: 2

Related Questions