您现在的位置是:首页 >  云笔记 >  SEO学习 >  文章详情

Google Adsense找不到ads.txt,但网站上确实添加如何解决

特不靠谱   2023-05-26 10:52:31   357人已围观

我自己的网站确实添加了ads.txt,基本各个目录我都添加了,用域名也可以访问,如下图:

图片.png

对比了内容也完全一样:

图片.png

但是就是谷歌广告后台提示没有:

图片.png

你说气人不气人,用它的工具排查了一下:

图片.png

图片.png

最后咨询对比了一下发现的确有轻微的不同,不同的地方在于我自己的域名用www.onekbit.com可以访问,用onekbit.com不能访问 。改了一下自己的域名解析配置:

图片.png

改了之后还是不行,接着尝试找问题:

图片.png

原来是:http://domain.com/ads.txt无法访问:

图片.png


修改tomcat,在conf文件夹的web.xml 最后添加

 <!--开启http强制跳转https访问-->
      <login-config>
          <!-- Authorization setting for SSL -->
          <auth-method>CLIENT-CERT</auth-method>
          <realm-name>Client Cert Users-only Area</realm-name>
      </login-config>
      <security-constraint>
          <!-- Authorization setting for SSL -->
          <web-resource-collection>
          <web-resource-name>SSL</web-resource-name>
          <url-pattern>/*</url-pattern>
          </web-resource-collection>
          <user-data-constraint>
          <transport-guarantee>CONFIDENTIAL</transport-guarantee>
          </user-data-constraint>
      </security-constraint>


分享到:

编辑发布时间:2023-05-26 10:52:31