Bing blogs

This is a place devoted to giving you deeper insight
into the news, trends, people and technology behind Bing.

Bing Developer blog

March
22

Add a Bing Search Box to your site in 3 easy steps

Got Bing on your site yet? If not, there's an online tool that makes adding a Bing search box to your site nice and easy.

Simply go to http://www.bing.com/siteowner for the 3-step process to add an advanced search box that you can customize, so users can search your site or search the Web from your site..

If you prefer working directly with the code, read on.

To let your visitors search the Web from your website, add the following code to your webpage:

<form method="get" action="http://www.bing.com/search">
<input type="hidden" name="cp" value="CODE PAGE USED BY YOUR HTML PAGE" />
<input type="hidden" name="FORM" value="FREEWS" />
 <table bgcolor="#FFFFFF">
  <tr>
   <td>
    <a href="http://www.bing.com/">
    <img src="http://www.bing.com/siteowner/s/siteowner/Logo_51x19_Dark.png" border="0" ALT="bing" />
    </a>
   </td>
   <td>
    <input type="text" name="q" size="30" />
    <input type="submit" value="Search Web" />
   </td>
  </tr>
 </table>
</form>

Note: replace "CODE PAGE USED BY YOUR HTML PAGE" with the code page number of the language your website is written in. For example, if your website is written in a western European-based (also known as Latin 1) language, such as French, English, or German, replace this instruction with the number 1252:

     value="1252"

For a list of code-page values for all languages, see the Code pages supported by Windows webpage.

To let your visitors search your website, add the following code to your page(s):

<form method="get" action="http://www.bing.com/search">
<input type="hidden" name="cp" value="CODE PAGE USED BY YOUR HTML PAGE" />
<input type="hidden" name="FORM" value="FREESS" />
 <table bgcolor="#FFFFFF">
  <tr>
   <td>
    <a href="http://www.bing.com/">
    <img src="http://www.bing.com/siteowner/s/siteowner/Logo_51x19_Dark.png" border="0" ALT="bing" />
    </a>
   </td>
   <td>
    <input type="text" name="q" size="30" />
    <input type="submit" value="Search Site" />
    <input type="hidden" name="q1" value="site:YOUR DOMAIN NAME GOES HERE" />
   </td>
  </tr>
 </table>
</form>

 

Follow the same instructions from the first snippet to locate your Code and also don't forget to substitute your domain name where indicated.

Within minutes you can enjoy the power of Bing Search directly on your site.

 -- George Thomas Jr., Bing Developer Center

 

Comments

  • Good Call. I'll find some time to add this!

  • This is very easy and effective in search results...

  • Thanks!

  • This is a very simple but useful Bing search box, thanks.

  • I want to change my Google Custom Search in my website http://shareonu.com - with Bing Search Box.

    Thank you.

  • Thanks for the help. I am going to use that in my website.

  • 我先试试 不知道在我的网站www.fengruichina.com/%E4%B8%8A%E8%A1%A8%E7%8E%B0%E6%80%8E%E4%B9%88%E6%A0%B7

  • <a href="www.bing.com/siteowner">Broken link</a>

  • Advice me more about this value="CODE PAGE USED BY YOUR HTML PAGE".

  • I will try this. Keep posting these interesting tips and suggestions.

  • thanks for the code! hope it will work for my site...

  • Thank you George for the concise instructions.  Very easy to implement and replace Google CSE on our site.  We replaced old Google Search code on a trial page in under two minutes.  We expect total effort to replace search throughout the site to take under five minutes on other pages now that we have the code.  We will shout praises if this works out well.  

    Now how about a word or two of you wisdom about getting our site indexed more thoroughly so that the new Bing Search! is more effective.....!!

    Goodbye Google

    HELLO Bing!

  • I hope that the search engine is transmitted to the

    http://www.glakssa.com

  • Hi everybody, I just add 2 my site to Bing tool,I was use Google,

    I dont know how to submit site map to Bing could you help me

    my site: http://tinbaohiem.com

    and http://joomquery.com

    thanks

  • Can i use the script in wordpress Blog. How to embed the code in wordpress?

    http://www.renons.in/