AMP HTML amp-ads - 阻止的框架,协议,域和端口必须与

时间:2018-05-17 09:00:20

标签: nginx adsense amp-html amp-ad

我试图解决一个错误,导致我无法在我构建并在nginx服务器上托管的amp-html网站上展示google-adsense广告。我已经在Stack Overflow,Google AdsenseAmp By Example文档上搜索并阅读了很多类似的问题。

我根据Google's instructions放置了一个放大器广告。页面本身正确加载,但是用于广告所在的空白区域。在控制台中,我收到此错误(两次):

Blocked a frame with origin "https://d-1234567890.ampproject.net" from accessing a frame with origin "https://example.com". Protocols, domains, and ports must match.

我最近将名称服务器移动到了一个新服务器,该服务器现在支持https而不是http。该网站似乎仍在Adsense中验证,但它是否尝试通过错误的协议发送广告?

  1. 协议必须匹配 - 似乎就是这种情况,因为两个网站都是https。

  2. 域和端口必须匹配 - 确定,但如何验证这些?

  3. 除此之外,我不太确定如何解决问题,除了盲目关闭安全措施。我应该查看我的标题(X-Frame-OptionsX-Content-Type-Options等)吗?还是我的Content-Security-Policy标题?或者Google Adsense仍在使用旧的http协议吗?

    FWIW,我也在控制台中收到这些(相关的)警告:

    [Warning] The resource https://3p.ampproject.net/234567890/f.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it wasn't preloaded for nothing. [Warning] The resource https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it wasn't preloaded for nothing.

    提前感谢您的帮助。

0 个答案:

没有答案