Google AdSense: How To Show Search Results On Your Own Page

While opening Google AdSense search results  within your own site is definitely not new, I haven't seen any quick review explaining how it all works and what's required to set it up. Working on enabling this AdSense feature for my Personal Development blog, I figured someone else could find this post useful.

 

Introduction

Why would you want to show Google search results on your own page? To make sure your visitors enjoy the same interface the rest of your website has, of course. To ensure the design integration makes visitors feel as if they're browsing just another one of your pages.

Everyone who had used Google AdSense for search feature in the past, must remember that you had only an option to change some basic colors for the results block, and it would be opened from Google's website and usually look very different from the rest of your website.

Well, now we have an option to change this.

 

How it works 

The idea behind showing your Google search results on your own site is pretty simple. You've got to set up a designated search results page on your site. You're free to change any design feature of this page to make sure it looks as good as any other page of your website, but space for the Google search results must be reserved.

Instead of one piece of Google AdSense code, you're going to get two. The first piece of code is the one creating a Google search form for your website. Something which will look like this:

 

Google AdSense search form

 

 

The second piece of code is for your results page. Just copy & paste the search results code from your Google Adsense to your search results page,  and you're done. If you open such a page manually, without being called by Google AdSense search form, you will see no search results, but if the page is shown as the result of an actual search using the Google search form on your website, you will see a neat page with all the results found and nicely integrated in your design.

 

Step-by-step instructions

I don't intend this page to be a full manual on the Google AdSense search results integration by any means, but all the steps shown before will hopefully show you how easy the whole procedure is. 

 

1) Google AdSense account – you must have a valid AdSense account to begin with. If you still haven't got one, it's not too late to get one – you will find all the details in my Getting Started with Google AdSense article.

 

2) Find out the URL of your future results page 

You need to know where you results page is going to be found, because you will be asked for this URL in during AdSense for search setup.

For WordPress-based blog, it is fairly simple to specify the exact name of your page and therefore know the full URL for this page without even creating it (you can't created it yet, read on to find out why)

 

3) AdSense for search setup 

Log into your AdSense account, open the AdSense Setup tab,  click the AdSense for search, and configure your Google AdSense search in a way similar to this:

  • Search Type section – this is where you decide what kind of search you would like to provide your visitors with. Most likely, you will opt for a Google WebSearch + SiteSearch, as it allows both global and local (your domain-specific) searches.

    Click the radio button for the desired option, and if you opted for the SiteSearch option, type your website's URL in the form provided.

  • Search box style section – this dialog allows you configure the way your Google search form will look on your website
  • More options section is the one where you need to choose the preferred way of  Opening of search results page. If you click the  Open results within my own site radio button there, you will be prompted for a URL of your search results page from Step 2 of this how-to.

Complete all the rest options like you normally would, and the last step of your AdSense for search setup will be the two pieces of code I have mentioned before, ready for you to copy and paste into your website pages. 

 

4) Create a designated search results page for your website

Now that you have the necessary pieces of code in your AdSense setup window, would be a good time to create the results page of yours.

If you're a blogger, then you need to create a static page of some kind and make it look the same way you'd like it to be, leaving space to be populated with search results. 

If your blog is WordPress-based, you will need to create a page template, and then create a new page based on this template. You can find all the necessary information on working with Pages in WordPress on the Pages section of official WordPress documentation site. 

Essentially, a page template in WordPress is nothing but an PHP/HTML file you create in your WordPress theme directory. Take one of the existing page templates to start off, and make sure you paste the second piece of AdSense search code  into this page template where you would like to see your search results.

 

5) Update your website to include the latest AdSense code for the search form. This is where you decide what page of your website (or pages if it's your blog – cause many bloggers put search forms in the sidebar code, so that the search form is shown on practically every page of their blog.

 

That's all, you're done. Enjoy your new Google AdSense search results page!

If you're looking for a working example, please visit my Personal Development blog, and use the search form found on the right  sidebar. If you want to compare my search results page to the same page opened manually, you can always open the search results page yourself (like I mentioned before, you will obviously see no results in this case).

Let me know if you need help with getting this AdSense feature working on your website – just a leave a comment for this post, and I'll be sure to contact you using the email provided.

Also, I think you would benefit from reading the official AdSense support article on the same topic: How do I implement Adsense for search results on my own page?
 

WordPress Tutorials by cre8d design

Rachel Cunliffe in her cre8d design blog just posted a wonderful WordPress Quick Screencast Tutorial, Part 1

 

Part One is a half-an-hour video tutorial showing you how to set up a brand new blog of yours. It covers such topics as downloading the freeware FTP software and using it to upload your WordPress blogging engine to your hosting provider. The tutorial also explains what posts and categories are, and shows you how to quickly create the very first post of yours. There is also quite a number of quick tips on getting started with your WordPress blog.

Well done, Rachel! It's always much better to show how to do something, and I think this 30min video covers what could possibly take pages and pages of online tutorials.

 

For any of you just thinking of setting a new blog up – this is one video you must watch!

The second part of the tutorial is expected soon, so I'll probably just update this post when it's available for you to download.

DaFont: Thousands of Fonts For Download

Just read about the DaFont resource once more, this time in Lifehacker's Find the perfect font post.

Not only does this resource has 6900+ fonts available for download, but it also has them all neatly organized and searchable by various font features.

I particularly like the Top 100 fonts with the preview of your text:

Perfect Blogger Gets A New Design

Having used only standard themes on all my blogs so far, I've finally decided to be a bit more creative and quickly created this new theme for Perfect Blogger.

As many of you can probably notice, it's not a new theme, but a slightly changed 3K2 one. Hopefully, it will seem more attractive to all the new visitors and readers.