What is a Querystring?

Article Details
  • Written By: Derek Schauland
  • Edited By: O. Wallace
  • Last Modified Date: 23 March 2020
  • Copyright Protected:
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
The moon now has high-speed Internet access, thanks to a laser-based communications system unveiled in 2013.  more...

April 7 ,  1954 :  President Eisenhower gave his "domino theory&quo  more...

The web browser has revolutionized computers and the information made available using them. Sometimes using a web browser is as simple as entering "" into the address bar and pressing enter (or clicking the GO button). Many times this will take any computer user where they need to go and nothing further will be needed.

Other times, a web surfer may be visiting a search engine when the search query is entered and the web surfer clicks the search button the item in the address bar is no longer very friendly. Consider the following example:

To search for Malted Milk Balls on the Internet, using Google, the string "Malted Milk Balls" is entered and the search button is clicked.

The address bar changes when the results are returned to display the following:

The portion beyond the last forward slash (/) is referred to as a querystring. A querystring is a URL containing a list of variables which are passed to the web server to retrieve information. In the case of the example above, the querystring tells the web server at Google to search the database in english (hl=en) and query the database for Malted+Milk+Balls (q=Malted+Milk+Balls). The last variable passed is the button used to find the results (btnG=Search).


If the Google Search Button on the homepage had been clicked, the btnG= portion of the query string would have read something like btnG=Google+Search.

Querystrings may not seem all too useful, but they can assist in accessing applications from other pieces of code and allow the web page to be skipped. For example, some web pages now include their own Google search boxes. These boxes work the same as the one shown on by simply sending a query string with s= to the google search engine.

The use of query strings can also be used to create a search for a particular site or search engine in the search engine dialog of both Internet Explorer 7+ and Mozilla Firefox. These features in the browser allow any website with a search box to be used from the browser without visiting the actual search page. Query strings help make this possible.

One more way to use a querystring would be to enter into a browser address bar. The result should return results for fun and games. It passes the querystring "fun and games" to the search application at

A querysting is just another way to access applications on the Internet. Many times they may not be noticed, but other times they can allow additional access to web based services and databases.


You might also Like


Discuss this Article

Post your comments

Post Anonymously


forgot password?