What happens when you type something into Google
When you type a question or phrase into a search engine and hit Enter, the engine does not search the live internet in real time. Instead, it searches an enormous index — a pre-built catalog of billions of web pages that the search engine has already visited and stored. The search engine then ranks those pages by relevance and shows you the highest-ranked results first.
This happens in milliseconds. The speed is possible because search engines do the hard work of cataloging the web ahead of time, not during your search. If a search engine had to visit every website on the internet every time someone searched, results would take hours or days to appear.
Key Takeaways
- Search engines use automated programs called crawlers to visit websites and read their content, then store that information in an index.
- When you search, the engine ranks indexed pages using hundreds of signals, including how often your search terms appear on the page and how many other sites link to it.
- A page's rank can change when the engine re-crawls it and finds new content, or when other pages on the web change.
- Search engines show you results based on what they think you are looking for, which is why the same search can show different results on different devices or accounts.
How search engines build their index
Search engines use automated programs called crawlers (also called spiders or bots) to visit websites. A crawler starts at one page, reads the text and links on that page, then follows those links to other pages. It keeps going, visiting millions of pages and storing what it finds in a massive database called an index.
Crawlers do not read pages the way you do. They extract the text, the links, the headings, and metadata — information about the page hidden in the code. They note when a page was last updated and whether it loads quickly. They do not watch videos or see images the way your eyes do, though they read the text descriptions attached to images.
A crawler visits the same website repeatedly — sometimes daily, sometimes monthly — to check for new content or changes. A popular website like CNN gets crawled constantly. A small local business website might get crawled once a month. The search engine decides how often to crawl based on how frequently the site updates and how important the engine thinks it is.
How search engines decide what to show you
Once a page is in the index, the search engine ranks it using a ranking algorithm — a set of rules that score each page based on hundreds of signals. The engine does not publish the exact formula, but the major signals are well understood.
Relevance is the first signal. If you search for "how to fix a leaky faucet," the engine looks for pages that contain those words or similar ones. A page that mentions "leaky faucet" multiple times in the main text ranks higher than a page that mentions it once in a sidebar. A page titled "How to Fix a Leaky Faucet" ranks higher than a page that just happens to contain those words.
Links from other websites are the second major signal. The engine treats a link as a vote of confidence. If 50 websites link to a page about fixing faucets, the engine assumes that page is trustworthy and useful. A page with many links ranks higher than a page with few links, all else equal. Links from well-known or authoritative websites count more than links from unknown sites.
User behavior is a third signal. The engine tracks whether people click on a result, how long they stay on the page, and whether they go back to search results and try a different link. If most people click on result #3 instead of result #1, the engine may eventually move result #3 higher. This feedback loop helps the engine learn which pages actually answer the question.
Page speed, mobile-friendliness, and freshness also matter. A page that loads in one second ranks higher than one that takes five seconds. A page that works well on phones ranks higher than one that does not. A page updated last week ranks higher than one updated five years ago, if the topic is time-sensitive.
Why you see different results than someone else
Search results are not the same for everyone. The engine personalizes results based on your search history, your location, and the device you are using.
If you have searched for "best running shoes" ten times in the past month, the engine learns that you care about running. The next time you search for "shoes," it may show you running shoes higher in the results than it would for someone who has never searched for running gear. This personalization happens whether you are signed into a Google account or not — the engine tracks you using cookies and your IP address.
Location matters too. If you search for "pizza near me," you get results from your city. Someone in another state gets different results. The engine uses your IP address, your device's location settings, or your account location to figure out where you are.
Device type also changes results. A search on a phone may show results optimized for mobile screens, while the same search on a desktop may show results optimized for larger screens. Some pages rank higher on mobile than on desktop because they load faster or display better on small screens.
What happens when a website changes
Search results are not frozen. When you update a page on your website, add new pages, or delete old ones, the search engine eventually finds out and updates its index.
The time between when you change something and when the engine re-crawls it varies. A major website might be re-crawled within hours. A small site might not be re-crawled for weeks. You can speed this up by submitting a sitemap to the search engine — a file that lists all your pages and tells the engine where to look.
When the engine re-crawls a page and finds it has changed significantly, it may re-rank it. A page that was ranked #10 might move to #3 if you added relevant content. A page that was ranked #1 might drop if you removed important information or if other pages on the web have become more relevant.
How search engines make money
Search engines are free to use, but they make money by selling advertising. When you search for something, the engine shows you a few ads at the top or side of the results page. Advertisers pay the search engine when you click on their ad.
This business model creates a conflict of interest. The search engine wants to show you the most relevant results so you keep using it. But it also wants to show you ads, which take up space on the page. Most search engines try to balance this by clearly marking ads as ads and showing them separately from organic results — the unpaid results that come from the index.
The ranking algorithm itself is not for sale. You cannot pay Google to rank your website higher in organic results. You can only pay to show ads. This separation is important because it means the search results are based on relevance, not on who has the biggest advertising budget.
Why some websites do not appear in search results
A website might not show up in search results for several reasons. The most common is that the search engine has not crawled it yet. New websites can take weeks or months to appear in results, especially if no other websites link to them.
A website might also be blocked from search results intentionally. The owner might have added a line of code telling crawlers not to index the page. This is common for login pages, shopping carts, or pages the owner does not want to be public.
A website might be penalized if the search engine thinks it is trying to cheat the ranking system. Common violations include keyword stuffing (repeating the same word over and over), cloaking (showing different content to crawlers than to real visitors), or buying thousands of fake links. Penalties can drop a site from the first page of results to page 50 or remove it entirely.
Frequently Asked Questions
Can I pay a search engine to rank my website higher?
No. You cannot pay Google, Bing, or other search engines to improve your organic ranking. You can only pay for ads. The ranking algorithm is separate from advertising. If someone claims they can may provide a higher ranking for a fee, they are either lying or offering to buy ads, not improve your actual ranking.
How long does it take for a new website to show up in search results?
It depends on how discoverable your site is. If other websites link to you, a crawler may find you within days. If no one links to you, it can take weeks or months. You can speed this up by submitting your website to Google Search Console and Bing Webmaster Tools, which tell the search engines where to find you.
Why does the same search show different results on my phone and my computer?
Search engines optimize results for the device you are using. Mobile results prioritize pages that load quickly and display well on small screens. Desktop results can show pages with more text and complex layouts. The engine also uses your location and search history, which may differ between devices if you use different accounts or have location services turned on differently.
Do search engines read the content inside images and videos?
Search engines cannot watch videos or see images the way you do. They can read text descriptions attached to images and videos, and they can read captions or transcripts if you provide them. They also look at the filename of an image. To help search engines understand your visual content, use descriptive filenames and alt text.
What is the difference between organic results and paid ads?
Organic results come from the search engine's index and are ranked by relevance. Paid ads are purchased by advertisers and appear at the top or side of the page, clearly marked as ads. The search engine makes money from ads, not from organic results. Organic results cannot be bought, only earned through relevance and links.