Display Ads Only To Search Engine Visitors On Blogger Blog

I have previously written about displaying ads only to search engine traffic by using ad injection plugin for WordPress. But many people have asked me, if this is possible for blogger or not? The answer is yes, its possible.

In WordPress its as easy as clicking few buttons to setup all this ‘Display ads to search engine visitor’ stuff. But in blogger, you don’t have plugins, neither you can use php code. So the only way you can set up this ‘Ads to organic traffic’ thing is by using JavaScript.

In this post, I’ll show you how to display ads only to search engine visitors on your Blogger blog using some JavaScript. For this you’ll need to edit the blogger template.

There are two parts of code which you’ll need –

  1. Code to detect search engine visitor and set up ad units (Main Code)
  2. Code to Display Ad Units

Main Code

The code given above will help you to detect a search engine visitor to your Blog. Also at the end of the code you can find a function called as adunit1.

Copy the code given above into a notepad file. And make appropriate changes to the adunit1 function at the end of the code. You’ll have to replace the xxxx’s with the appropriate numbers from your Adsense code and you’ll have to change any other details (such as ad width and height if you’re not using a large rectangle).

Where To Add ‘Main Code’ ?

  1. Go to Blogger Dashboard > Template > Edit HTML
  2. Find <title><data:blog.pageTitle/></title>
  3. And just below it copy paste the Main Code
  4. Save Template

Check the screenshot given below. The main code (which is highlighted) is directly below <title><data:blog.pageTitle/></title>. This is how it should look like when you add the code to your Blogger template.

Adsense Main Code Blogger

Code to Display Ad

This is the code you’ll need to display the adunit1 which you added in main code. So basically all ad unit codes go inside the main code in the form of a JavaScript function. And wherever you need to display that particular ad unit, you’ll just add a JavaScript function call, which will help to display that ad unit.

Where to Add ‘Code To Display Ad’ ?

You can add this code in your template itself or you can even use it inside a Blogger Gadget. To use it inside Blogger Gadget follow the steps given below –

  1. Go to Blogger Dashboard > Layout
  2. Click on Add a Gadget button depending on where you would like to display the Ad.
  3. Now choose HTML/JavaScript from Gadgets list.
  4. Simple insert the code to display ad in content box
  5. Save the Gadget.

Check if it works

Find your website by using Google Search and visit your site from the search results. If you have followed everything properly then you must see your Ad when you visit the site from a search engine. Good luck.

If you have any problems, feel free to comment below. I’ll try to help.

Adding Multiple Ad Units

You can add multiple ad units by duplicating the adunit1 function in the main code and naming the new function as adunit2. Then you can call the new function by adunit2 function call in a new Blogger Gadget.

Note: Adding more than 3 ad units on single page is against Google AdSense Policies, so don’t do that.

Posts based on Organic Traffic –

  1. Increase AdSense CPC By Displaying Ads Only To Organic Traffic
  2. Using Ad Injection To Show Ads Only To Search Engine Visitors (WordPress)
  3. Display Ads Only To Search Engine Visitors On Blogger Blog

What is gws_rd=cr in Google URL

Last night, As i was about to switch off my computer, I noticed something strange on my browser. It was a weird URL in the address bar of Google chrome. I thought its a bug and reloaded the homepage (google.com) but again the weird part appeared at the end of google.com. It was like appended at the end.

Normally when we visit Google search, we find ourselves at www.google.com but i was being redirected to www.google.co.in/?gws_rd=cr. At first, i thought that my PC is infected. But it wasn’t.

I tried switching to different browsers and incognito mode as well, but the result was the same. I was still being redirected to a strange URL. Check the Image below.

gws_rd=cr screenshot google chrome

Wikipedia Sources

Then i searched for gws_rd=cr in Google search, but i couldn’t find any accurate answer. I spent an hour on this and finally figured out that GWS meant Google Web Server. Source Wikipedia. But the rest part rd=cr was still a mystery to me.

Google Product Forum Sources

Today i decided to search for gws_rd=cr in Google Product Forums and guess what? I found a thread about it. Here’s the link. That thread lead me to another website called stack exchange where some people have answered to this question.

Remote Desktop?

Some people assumed rd stood for remote desktop. That could be the worst threat to your computer. Since remote desktop means someone can remotely view or control your computer. But don’t worry that was just a wild assumption.

Mystery Solved

Finally the mystery is solved, rd=cr simply meant redirect and country. gws (google web server)_rd(redirect)=cr(country). So basically, when you visit google.com they are redirecting you to a google web server according to your country. That’s what it can be. Check the image source given below.

gws rd cr source stack exchange

However if you have any more sources or info, leave it in the comments. This will help to add more updates to this post.

Increase AdSense CPC By Displaying Ads Only To Organic Traffic

Are you getting low CPC in your Google AdSense account? Then maybe i can help you with it. One way to increase AdSense CPC is by displaying AdSense advertisements only to organic traffic. Organic traffic means the traffic driven to your websites by natural search engine results. Now you might wonder, How is this going to help increase AdSense CPC, right? But trust me, it works. I’ll explain.

First lets clear the basics, CPC means Cost Per Click. This is the revenue which you earn when a visitor clicks on the advertisement. In simple language, if you receive 10 clicks with $0.04 CPC then your estimated earnings would be 10 x $0.04 which equals to 0.40 dollars.

The next thing which you should know about is CTR and Pageviews. Pageview is counted when a user views a page displaying Google Ad. While CTR is equal to number of clicks divided by pageviews (clicks / pageviews).

Direct Visitors

If you display ads to direct traffic then AdSense pageviews increases but unique clicks decreases and chances of invalid clicks increases. And because of these invalid clicks, CPC decreases.

Organic Traffic

If you display ads only to search engine visitors then AdSense pageviews decreases but unique clicks increases and chances of invalid clicks are almost next to zero.


You get unique and valid clicks by displaying ads only to search engine visitors. Also useless pageviews are reduced. By useless pageviews, i mean those pageviews which displays an AdSense Ad but receives no clicks. By reduction in useless pageviews, Page CTR increases.

And with this increase in chances of valid clicks and page CTR, your CPC rises. Note that, this doesn’t happen in one day. It will take at least a week to experience a change in AdSense CPC.

Posts based on Organic Traffic –

  1. Increase AdSense CPC By Displaying Ads Only To Organic Traffic
  2. Using Ad Injection To Show Ads Only To Search Engine Visitors (WordPress)
  3. Display Ads Only To Search Engine Visitors On Blogger Blog