How To Create Google Custom Search Engine?

Google-Custom-Search-EngineWhen it comes to crawling the internet or a website nothing can surely beat Google's searching technique. Blogger Templates that are found in various designs and colours often have custom search boxes in it, which I am sure you might have observed are incapable of displaying the relevant results. These search boxes by default are limited to their ability of searching each and every word of your blog. The best solution is to use Google Custom Search Engines (CSE) that are extremely efficient in digging out the most important data from your blog and displays it to the visitor. This increases the number of pageviews and page impressions of your blog because the reader is kept engaged in reading more and more. Further you can easily integrate your Google AdSense Ads to your Google Custom Search box, which again increases your blog revenue for every click made on the search results. An Example of such search engine can be found below every post of this (MBT) blog. So lets create and install a beautiful Google Search box for your blog.

How To Create a Custom Google Search Engine?

  1. Go To Google CSE
  2. Hit the create custom search engine button
  3. Fill the form as shown in the screenshot below,

set up your google search engine

   4.   The Click the next button and choose the Design for your search engine. You can click the "Customize" button to edit the colours and look.


   5.  Hit the next button and then click the "Look and feel" link on the next page as shown below,


It will bring you a page where you will find three layout options i.e Full -width, Compact and Two Column as shown below,

Google Search Engine Layouts

  • If you wish to add the search box just below posts as I have done on my blog then choose Full-width
  • Or if you wish to display the box and results on the sidebar then choose compact
  • Else if you wish to add your search box to your sidebar and display the search results above the post title then choose Two Column

  6.  Finally hit "save & get code" button and jump to the next part of our tutorial.

Add Google Custom Search Engine To Blog Posts

To add the search engine just below your blog posts as we have done on MBT then please follow the steps below,

customize Google Custome Search Engine

  1. Go To Blogger > Design > Edit HTML
  2. Backup your template
  3. Click the Expand Widgets Templates Box
  4. Search for <data:post.body>
  5. Just below it paste your Blog Post Search Engine Code (Full-width)
  6. Save and you are done!
  7. View your blog to see it appearing just below posts.

Add Google Custom Search Engine To Blog Sidebar

  1. Go To Blogger > Design
  2. Choose a HTML/ JavaScript Widget
  3. Paste your Sidebar Search Engine Code (Compact or Two Column) in it
  4. Save and you are done!
  5. View your blog to see it working just fine

Changing your default search box to Google Custom Search Engine Box is an important step that you must take as early as possible. You will see the difference in your analytics the next week. In the next post as shared below you will learn to integrate your AdSense Ads to your Custom Search engine and increase your Adsense earnings.

Hope you liked it! :)

If you don't want to get yourself into Serious Technical Trouble while editing your Blog Template then just sit back and relax and let us do the Job for you at a fairly reasonable cost. Submit your order details by Clicking Here »


We have Zero Tolerance to Spam. Chessy Comments and Comments with 'Links' will be deleted immediately upon our review.
  1. great work mbt, now we can customize google search button also.
    i thing it is more powerful than default search engine.
    and eagerly waiting for a post on avatars also.

  2. Sorry mohd_ for disturbing you,problem solved for avatars,now you have no need to write an post on it..


  3. @karan

    No problem buddy. But I still need to post one on it as I have not shared it as yet and I have some beautiful designs for it which I hope you guys will like a lot. :>

  4. @beben

    You made me confused though. :p Didn't get your question?

    It surely is legal because the customization is provided by Google itself.
    For the blogger thing, I have heard that they have redeveloped it and given it a new look with web search form but I don't know if they can impose it as a must on all bloggers to display it at the top. Doesn't make sense.

  5. @Lucky

    Forgot about the link. I think we should add a "Powered by Blogger" Link in our blogs at least

  6. Hello,

    What if we need the search engine to appear only in post pages? With your method explained above it is appearing on homepage too under all posts.


  7. @Mari
    The above custom search engine was made available by Google to web masters so that Google could better index the website data as well as help the website visitors to get the most relevant search data. It is indeed a SEO must.


    Oh I am sorry I forgot to mention that. to show the search engine only on post pages, simply enclose the search engine code between these lines,

    <b:if cond='data:blog.pageType == "item"'>



  8. @Felix

    You can use the same code as many times as you want. :>

  9. @Felix
    Forgive me for the late reply pal.
    When you change the visibility mode of the search engine then of course coding will change. Yes you are absolutely right, You will have to create a separate CSE. This will better help you in monitoring the CTR. Hope this was clear. :>

  10. CSE changes to layout options - Thursday, June 16, 2011 - have resulted in the inability to carry out a date range search by adding, for example, '&as_qdr=d5' to search string. Do you know how I would do the equivalent search in the new environment?

  11. If you are using your Taz template. How do you place that in your search section you provided?

  12. This comment has been removed by the author.

  13. Hi buddy...i want to place search box just under the header...just like can i do that...plz help me...thanx...

  14. Mohd.
    Excellent post ,i was waiting for this post since many months but surprised how I missed it ...nonetheless good i asked u the other day otherwise i would have wasted more time looking here and there....ur way of explaining things are simply GREAT !!!
    HATS OFF !!

  15. i have two cse's and I would like a drop down menu beneath the search bar that you can select which cse to use. Do you know how to do that. Specifically, I'm looking for code. Thanks.

  16. I chose 2 columes which I wanted the result to be show above the post, not in the top of the post, actually above it, where do I put the code it offered me?

    div id="cse" style="width:100%;"></div "

  17. i want the search result to be displayed like yours. please give detail procedure.

  18. Hey,

    i need help...ive place code in html wigets but it doesnt seem to search any blogs.

  19. This comment has been removed by the author.

  20. @Movie Kang You want to add Two Column sidebar search box like this blog?

    So after placed code in html widgets, Go to Blogger > Design > Edit HTML >>Backup your template >> Click the Expand Widgets Templates Box. Now search <data:post.body> and paste the below code below it.
    <div id="cse" style="width:100%;"></div>

    If it's not work so search <div class='post-header'>

    and paste <div id="cse" style="width:100%;"></div> below.

    I hope it's will work :)

  21. I followed the procedure as stated in blog post Google custom Search engine for many times. But I could not find it working over my blog. A message loading is appeared below the post. Please guide me in this regard

  22. hi..

    dude i wants same search box like you. which "Display the search box in one area and the search results in another area - Two column" like your website.

    And I am trying since 2 hr but it is not working properly. when i add that "Two column" layout it doesnot work when i click on search button.

    Full-width layout is working but it is showing result bellow search box - check here on my website -( )

    And when i used default search widget, its work fine but bad luck we cant custmized it.

    please help me dude...thanx in advance.

  23. Hi is a there a way to add the cse to the mobile blogger template

  24. hello friend i want to promote my site again
    which is full of hidden tips and tricks so remind it

  25. Thanks a lot friend... I have successfully put a functional search engine in my blog ( post is great.
    More power!!!!!!!!!!!

  26. I think taht


    because I cant find in my template.

  27. I am always failed to create this one, I tried every time but result fail