How Search algorithms work

You want the answer, not billions of webpages, so Google ranking systems sort through the hundreds of billions of webpages in our Search index to give you useful and relevant results in a fraction of a second.

These ranking systems are made up of a series of algorithms that analyze what it is you are looking for and what information to return to you. And as we’ve evolved Search to make it more useful, we’ve refined our algorithms to assess your searches and the results in finer detail to make our services work better for you.

Here are some of the ways Google uses Search algorithms to return useful information from the web:

Analyzing your words

Analyzing your words

Understanding the meaning of your search is crucial to returning good answers. So to find pages with relevant information, our first step is to analyze what the words in your search query mean. We build language models to try to decipher what strings of words we should look up in the index.

This involves steps as seemingly simple as interpreting spelling mistakes, and extends to trying to understand the type of query you’ve entered by applying some of the latest research on natural language understanding. For example, our synonym system helps Search know what you mean, even if a word has multiple definitions. This system took over five years to develop and significantly improves results in over 30% of searches across languages.

We also try to understand what category of information you are looking for. Is it a very specific search or a broad query? Are there words such as “review” or “pictures” or “opening hours” that indicate a specific information need behind the search? Are you searching for trending keywords that imply you want content published that day? Or are you searching for a nearby business and want local info?

Matching your search

Matching your search

Next, we look for webpages with information that matches your query. When you search, at the most basic level, our algorithms look up your search terms in the index to find the appropriate pages. They analyze how often and where those keywords appear on a page, whether in titles or headings or in the body of the text.

As well as matching keywords, algorithms look for clues to measure how well potential search results give users what they are looking for. When you search for “dogs” you likely don’t want a page with the word “dogs” on it hundreds of times. We try to figure out if the page contains an answer to your query and doesn’t just repeat your query. So Search algorithms analyze whether the pages include relevant content — such as pictures of dogs, videos, or even a list of breeds. Finally, we check to see if the page is written in the same language as your question in order to prioritize pages in your preferred language.

Ranking useful pages

Ranking useful pages

For a typical query, there are thousands, even millions, of webpages with potentially relevant information. So to help rank the best pages first, we also write algorithms to evaluate how useful these webpages are.

These algorithms analyze hundreds of different factors to try to surface the best information the web can offer, from the freshness of the content, to the number of times your search terms appear and whether the page has a good user experience. In order to assess trustworthiness and authority on its subject matter, we look for sites that many users seem to value for similar queries. If other prominent websites on the subject link to the page, that’s a good sign the information is high quality.

There are many spammy sites on the web that try to game their way to the top of search results through techniques like repeating keywords over and over or buying links that pass PageRank. These sites provide a very poor user experience and may even harm or mislead Google’s users. So we write algorithms to identify spam and remove sites that violate Google’s webmaster guidelines from our results.

Considering context

Considering context

Information such as your location, past search history and Search settings all help us to tailor your results to what is most useful and relevant for you in that moment.

We use your country and location to deliver content relevant for your area. For instance, if you’re in Chicago and you search “football”, Google will most likely show you results about American football and the Chicago Bears first. Whereas if you search “football” in London, Google will rank results about soccer and the Premier League higher. Search settings are also an important indicator of which results you’re likely to find useful, such as if you set a preferred language or opted in to SafeSearch (a tool that helps filter out explicit results).

In some instances, we may also personalize your results using information about your recent Search activity. For instance, if you search for “Barcelona” and recently searched for “Barcelona vs Arsenal”, that could be an important clue that you want information about the football club, not the city. You can control what search activity is used to improve your Search experience, including adjusting what data is saved to your Google account, at myaccount.google.com.

Returning the best results

Returning the best results

Before we serve your results, we evaluate how all the relevant information fits together: is there only one topic among the search results, or many? Are there too many pages focusing on one narrow interpretation? We strive to provide a diverse set of information in formats that are most helpful for your type of search. And as the web evolves, we evolve our ranking systems to deliver better results for more queries.