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?
 

Archives page added

I've just added a PerfectBlogger Archives page, where you'll be able to find every post I've made on this blog.

 

Archives page is one of the basic pages each blog should have. Not only does it help your visitors navigate around your older posts, but it also servers SEO purposes: it helps search engines get to each of your pages with content the quickest way.

If your WordPress theme doesn't come with a built-in archives feature, or if you don't like it for some reason, I strongly suggest you download and install the SmartArchives plugin by Justin Blanton

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.

WYSI-WordPress

Last few really big posts on my Personal Development blog were an absolute struggle to publish. The built-in WYSIWYG editor WordPress 2.0+ is a nightmare to work with. While it handles simple texts more or less correctly, it’s helpless when it comes to anything as complex as a post with some numbered lists or lots of paragraphs with different font styles.

I must have edited and reviewed one of my posts at least 50 times before I gave up. I’ve started looking for an alternative plugin to replace this editor, and voila – I’ve found the WYSI-Wordpress!

WYSI-Wordpress is an incredibly useful plugin whch works correctly in both IE and Mozilla-based browsers. There are versions for both WP 1.5 and WP 2.0+ branches, and – most importantly of all! – this plugin actually IS WYSIWYG. So practically everything you see in your edit window is going to look the same in the preview area. I’m telling you, it’s been quite a relief for me to finally finish the formatting and enjoy seeing the entry text exactly the way I pictured it in my mind!

So if you’re sick of the built-in editor, disable it right away and try out the WYSI-Wordpress! You will never regret!

8 Best WordPress Plugins

If you're serious about blogging with WordPress, you will definitely like the 8 Invaluable WordPress Plugins article on PingMag website.

I've started using WordPress just a few months ago (before it was another blog engine – Serendipity), so I have personally used only a few of the plugins listed, and I haven't even heard about some others. Still, the 3 plugins I use already I can highly recommend:

ProBlogger: A Very Useful Blog

The more time I spend reading Darren Rowse's ProBlogger blog, the more I realize there's so much learning to be done!

I like ProBlogger a lot. It's one of these resources you know you'll find something useful on, so I sometimes just start reading through a series or a category of posts, and it's incredible how much stuff I've been thinking or worrying about is already explained and covered on ProBlogger's pages!

I can hardly find a blogging-related topic which isn't covered there (although this probably means I'm very new to the blogging and simply have tons of stuff to learn): general blogging tips, SEO, WordPress customization, AdSense – you name it! It's like a book (hey, that's an idea! It'll be a bestseller for sure!).

For some blogs, you enjoy the reading so much that you feel almost scared as you dig deeper and deeper into archives, because you know that someday you're going to reach the bottom of the posts archive, and that will the end. But with Darren's resource it's much better – not only it is a very comprehensive guide, but it's also a very dynamic one, so there is lots of useful and relevant information added daily.

I think I'm a fan of ProBlogger. After all, it is such a pleasure to learn from someone who grew knowledgeable in the field simply by trying all the steps you've already taken plus hunders more which you're only planning to take.