Lompat ke konten Lompat ke sidebar Lompat ke footer

How to Fix AdSense Ads Not Working on Bloggers

Image by Unsplash
Why aren't AdSense ads showing or only AdSense ad units appearing only on certain pages? One of the factors that causes AdSense ads not to appear on certain pages is that new friends activate the HTTPS feature provided by Google for custom domains on their blogs.

Yeah, for changes or migration of blogs from HTTP to HTTPS it turns out that it requires a process that also impacts on the loss of ads from AdSense ad units that have never been experienced before. This is because the type of protocol URL is not the same, the one without encryption (HTTP) while the other uses the encryption system (HTTPS) Well, this makes the system confused to read 2 different protocols on one page of the blog. But don't worry, this has been overcome by Google which already supports ad units, both those that use HTTP or HTTPS. If it supports it, then why does the ad still not appear on some blog pages? To fix this please follow the steps below:

By default (before being activated) the format for robot.txt is as follows


User-agent: Mediapartners-Google
Disallow:

User-agent: *

Disallow: /search
Allow: /
Sitemap: https://www.munadisyarif.com/sitemap.xml

Here we only need to change (activate) robot.txt so that ads can appear on all blog pages

First, open Blogger> click the Settings menu> click Search Preferences> Then find a Custom robot.txt as shown below
Dokumentasi Pribadi
After that, fill in the blank form in it with this robot.txt format


User-agent: Mediapartners-Google
Allow: /
Disallow:

User-agent: *

Disallow: /search
Allow: /
Sitemap: https://www.munadisyarif.com/sitemap.xml

*Change www.munadisyarif.com with your blog's domain name

Then click the Save changes button and finish. In this way it will also fix the Indexed Though Blocked by robots.txt error in the Search Console.

Additional

After implementing a special robot.txt, you also need to delete JS AdSense like this


<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

and replace it with this code, apply before the body cover code </body> or &lt;!--</body>--&gt;&lt;/body&gt;


&lt;script type=&#039;text/javascript&#039;&gt;
//&lt;![CDATA[
(function() { var ad = document.createElement(&#039;script&#039;); ad.type = &#039;text/javascript&#039;; ad.async = true; ad.src = &#039;https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&#039;; var sc = document.getElementsByTagName(&#039;script&#039;)[0]; sc.parentNode.insertBefore(ad, sc); })();
//]]&gt;
&lt;/script&gt;

After doing the above method, AdSense ads will not appear immediately, all need a process. You just have to wait until Google crawls the blog with the new robot.txt format. Thank you


loading...
munadi syarif
munadi syarif Blogger sejak 2 0 1 3

Posting Komentar untuk "How to Fix AdSense Ads Not Working on Bloggers"