Search
Clear search
Close search
Google apps
Main menu

AdSense for Search (AFS)

Show search results in your own site

When you display AdSense for search results within your site, the results of a user search performed in your AdSense for search box will appear within a frame on your own page. This means that rather than users being taken to Google, they will stay on your site, while still having access to the useful information provided through Google web search.

First, be sure to create the page where the search results will be displayed.

If your web host or site application does not offer you the ability to create a separate URL for your search results -- for example, if you're using Blogger -- you will not be able to implement your search results within your page.

Once you've created the page where search results will be displayed, follow these steps:

  1. Sign in to your account at https://www.google.com/adsense.
  2. Visit the My ads tab.
  3. Choose Search as the product.
  4. Click New custom search engine.Add AFS
  5. Customize your search engine as usual. Expand the Search results section.
  6. Select the radio button marked Display results on my website using an iframe. Show search results
  7. Enter the URL of the page you've created in which you'd like search results to appear. You must create this page yourself; it will not be created or displayed automatically on the URL you enter. If you're familiar with relative URLs, you're welcome to enter one instead of the full URL.
  8. Click Save and get code.
  9. Copy the code generated in the Search box code box and paste it into the HTML source of the page where you'd like to display the search box.
  10. Next, copy the code generated in the box labeled Search results code and paste it into the HTML source of the page on which you'd like to display the search results.
  11. Save your webpages.
Was this article helpful?
How can we improve it?
Sign in to AdSense

Sign in to AdSense to see help for your account

Don't have an AdSense account? Sign Up for AdSense!