javascript - Google 广告未在我的网站上展示

标签 javascript html ads adsense

我的 Google 广告没有显示在我的 HTML 主页上 - 而是有一个空白框。

这是它的样子:

enter image description here

代码是这样的:

<div class="advertising margin-bottom" align="center">
    <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <ins class="adsbygoogle"
         style="display:inline-block;width:265px;height:600px"
         data-ad-client="ca-pub-7557573862902525"
         data-ad-slot="6854013507"></ins>
    <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
    </script> 
</div>

最佳答案

未显示广告的原因是您的域被禁止访问(错误代码为 403)。

发生这种情况是因为 AdSense 不想在您的域上展示广告,或者是因为您的行为违反了 AdSense policies或者以前的域所有者所做的事情。

Policy specialists disable ad serving to a page or site when it’s found to be in violation of program policies

如果这是以前的域所有者所做的,并且您对网站的实现符合规定,那么您可以尝试请求恢复广告服务。

要查看有关如何执行此操作的信息:

  1. > Sign in to your AdSense account .
  2. 在左侧导航面板中,点击设置
  3. 点击政策中心

无法保证广告服务会恢复,因此如果您将来打算购买域名并将其与 AdSense 一起使用,您应该检查 AdSense 是否已在该域名上停用。

要验证您的域是否被阻止:使用 the Adsense Sandox tool ,并输入您网站的网址。如果没有广告显示(就像它们没有显示您的网址一样),则表示该域已被阻止。

关于javascript - Google 广告未在我的网站上展示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45688096/

相关文章:

javascript - 使用 window.print() 时失去焦点

javascript - Angular 不从指令调用链接函数

html - 将 anchor 的背景图像定位到 anchor 文本的左侧?

html - 在 &lt;input type ="number"> 上使用 padding 时会隐藏一半的文本或数字

android - 如何在 ListView 中添加原生广告?

javascript - 如何更改事件执行顺序?

javascript - Mongoose $pull 运算符不从数组中删除 ObjectID

java - 从 Html 字符串建模一个类,实例化该类并从该字符串填充变量,然后从该类返回 html 字符串

ios - advertisingIdentifier 和 identifierForVendor 返回 "00000000-0000-0000-0000-000000000000"

android - 在 AdMob 中测试第三方网络广告