How to Fix AdSense Ads Not Working on Bloggers
Image by Unsplash |
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
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 |
User-agent: Mediapartners-Google
Allow: /
Disallow:
User-agent: *
Disallow: /search
Allow: /
Sitemap: https://www.munadisyarif.com/sitemap.xml
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 <!--</body>--></body>
<script type='text/javascript'>
//<![CDATA[
(function() { var ad = document.createElement('script'); ad.type = 'text/javascript'; ad.async = true; ad.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'; var sc = document.getElementsByTagName('script')[0]; sc.parentNode.insertBefore(ad, sc); })();
//]]>
</script>
//<![CDATA[
(function() { var ad = document.createElement('script'); ad.type = 'text/javascript'; ad.async = true; ad.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'; var sc = document.getElementsByTagName('script')[0]; sc.parentNode.insertBefore(ad, sc); })();
//]]>
</script>
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...
Posting Komentar untuk "How to Fix AdSense Ads Not Working on Bloggers"