Ask Dave Taylor
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube
  • Home
  • Videos
  • Most Popular
  • Top Categories
  • Books
  • About Dave
  • Ask Me
  • > Donate <
  • Home
  • HTML and Web Design
  • How can I add an MSN Search Box to my Web site?

How can I add an MSN Search Box to my Web site?

February 27, 2019 / Dave Taylor / HTML and Web Design / No Comments

As a long time Windows user, I have grown to really like the MSN.com home page and Bing search. Now I’d like to add an MSN search box to my own site. Is that possible?

You can definitely reverse engineer the search system that Microsoft uses on its popular MSN.COM site and create a similar search for your own Web page. In fact, I offer details on how to do just that for search boxes tied to Google, YouTube, eBay, IMDb and even Bing here on my site. So you could add a lot of search boxes if you really wanted! 🙂

Up to now, however, I’ve never really looked at MSN. But it’s easy. Turns out that there are two basic ways that a Web page can pass information back to the server from within a FORM, known as a GET or a POST. The latter turns out to be more complicated, but sites that use the GET method of sending form data are quite easy to reverse engineer because all the name=value pairs of the submission are exposed right in the Web site URL itself.

For example, on MSN.com if you search for “kashmir” the actual URL of the search results page is:

https://www.bing.com/search?q=kashmir&form=PRUSEN&mkt=en-us&httpsmsn=1&refig=3cea5d44599a40f1bac7058d6d1f2d42&sp=-1&ghc=1&pq=kashmir&sc=10-7&qs=n&sk=&cvid=3cea5d44599a40f1bac7058d6d1f2d42

Scary complicated, right? But wait! You can typically dump almost all of these fields because they contain information that’s not essential to a search. But I’m getting ahead of myself. Let’s hold that thought and look at the MSN search:

msn search box

You’ve seen that box before, I bet. This time start typing and notice that you automatically get search suggestions from MSN:

msn search suggestions hints tips

There’s a lot of interesting data being shown here, actually, particularly if you’re interested in search engine optimization (SEO), but for our purposes I just need to share the bad news: It’s really super complicated to add search suggestions to your own copy of the MSN search box, so that will be above and beyond what we’ll be coding up.

Instead, finish a search and just for a moment bask in the glory that is Bing search results:

bing search results msn

Okay, now that you’ve checked out the results, it’s time to look at the URL or Web page address for the search results page.

As I showed earlier with a Kashmir search, the “best player epl” search produces this gnarly URL:

https://www.bing.com/search?q=best+player+epl&form=PRUSEN&mkt=en-us&httpsmsn=1&refig=3cea5d44599a40f1bac7058d6d1f2d42&sp=-1&ghc=1&pq=best+player+epl&sc=8-15&qs=n&sk=&cvid=3cea5d44599a40f1bac7058d6d1f2d42

GET form URLs area always in the format of

url ? name=value & name= value & name=value

So you can unwind the above and see that the search itself is performed by the page https://www.bing.com/search and that the first few variable value pairs are q=best+player+epl and form=PRUSEN.

This is where you need to pull on your mad scientist lab coat and experiment. <rubs hands together>

Ready?

Let’s get rid of every single name=value pair other than the very first one that contains the actual search term. You can do this in the URL box in your Web browser easily enough:

bing search - no variables

Nice short URL? Press Enter or Return to actually hand that data to the Bing search service and… it works! You get the same search results!

So it turns out that all you need is q=query and you’re good to go. Phew. That’s easy. Now to construct a new FORM that uses all the proper variables and fields:

<form method="get" action="https://www.bing.com/search">
  Search for: 
  <input type="text" name="q" />
  <input type="submit" />
</form>

That should do it. Here’s the form live:

Search for:

You can clean it up with fancy formatting commands, of course, but at its most basic, that’s your solution. Now carefully copy and paste this HTML onto your own Web page or blog post and see if you can get it to work for you!

Pro Tip: I’ve been writing about HTML coding for a long, long time. Please check out some of my HTML and Web page coding help while you’re here. Thanks!

Let’s Stay In Touch!

Never miss a single article, review or tutorial here on AskDaveTaylor, sign up for my fun weekly newsletter!
Name: 
Your email address:*
Please enter all required fields
Correct invalid entries
No spam, ever. Promise. Powered by FeedBlitz
Please choose a color:
Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!
add search box, bing search, html forms, msn search, reverse engineering, search box

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Recent Posts

  • Can I Have Microsoft Edge Suggest Strong Passwords?
  • How Can I Password Protect Tax Forms Sent Via Email?
  • Easy Way to Add Emoji to Tweets from a Web Browser?
  • How Do You Post Multiple Photos in Instagram?
  • How Can I Change the Default Search Engine in Google Chrome to Microsoft Bing?

On Our YouTube Channel

DIGDIY BUDGET ANC TWS Earbuds [D10WH] -- REVIEW

Rush Charge Hinged Smartphone Battery Stand -- UNBOXING & REVIEW

Categories

  • AdSense, AdWords and PPC Help (106)
  • Amazon Echo & Kindle Help (79)
  • Amazon, eBay and Online Shopping Help (157)
  • Android Help (158)
  • Apple Watch Help (49)
  • Articles, Tutorials and Reviews (326)
  • Business Advice (191)
  • Computer and Internet Basics (714)
  • d) None of the Above (160)
  • Facebook Help (364)
  • Google & Gmail Help (154)
  • HTML and Web Design (243)
  • Instagram Help (43)
  • iPad Help (136)
  • iPhone Help (570)
  • LinkedIn Help (79)
  • Linux Help (147)
  • Linux Shell Script Programming (86)
  • Mac & MacOS Help (830)
  • Most Popular (10)
  • MP3 Player Help (181)
  • Outlook & Office 365 Help (9)
  • PayPal Help (68)
  • Pinterest Help (53)
  • Reddit Help (11)
  • SEO & Marketing (80)
  • Spam, Scams & Security (82)
  • Trade Show Updates (23)
  • Twitter Help (212)
  • Video Game Tips (66)
  • Web Site Traffic Tips (62)
  • Windows 10 Help (825)
  • Wordpress Help (201)
  • Writing and Publishing (72)
  • YouTube Help (43)
  • YouTube Video Reviews (159)
  • Zoom, Skype & Video Chat Help (40)

Archives

Social Connections:

Ask Dave Taylor


Follow Me on Pinterest
Follow me on Twitter
Follow me on LinkedIn
Follow me on Instagram


AskDaveTaylor on Facebook



microsoft insider mvp


This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to our terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. Our lawyer says "Thanks for your cooperation."
© 2020 by Dave Taylor. "Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.
Privacy Policy - Terms and Conditions - Accessibility Policy