What happens when you type something into Google
When you type a question or phrase into a search engine and hit enter, your words travel to a company's servers, get matched against billions of indexed web pages, and come back as results in less than a second. That speed exists because search engines have already crawled the internet, catalogued what's on each page, and stored that catalogue in a way they can search when ready. The company running the search engine — Google, Bing, DuckDuckGo, or another — also stores a record of what you searched for, when you searched, and often which result you clicked.
The tracking happens automatically. You don't opt in; it's the default. Search engines keep these records partly because the data helps them improve their results, and partly because they sell advertising based on what people search for. Understanding how this works helps you decide whether you want to limit what gets stored about your searches, or whether the trade-off feels acceptable to you.
Key Takeaways
- Search engines index the web by sending automated crawlers to read pages, then store that index so they can match your search terms to relevant pages in milliseconds.
- Your search history is stored on the search engine's servers by default, linked to your account if you're signed in or to your IP address and device if you're not.
- Search engines use your search history to show you personalized results and to build a profile of your interests for advertisers.
- You can delete your search history manually, turn off search history storage in your account settings, or use a search engine that doesn't store searches at all.
- Private browsing mode prevents your browser from storing searches locally on your device, but does not stop the search engine itself from recording what you search for.
How search engines index the web
Search engines use software called crawlers (also called spiders or bots) to visit web pages automatically, read the text and links on each page, and report back what they found. These crawlers start from known pages and follow links to new pages, building a map of the web. Google's crawler visits billions of pages constantly, updating its index as pages change or disappear.
Once a crawler reads a page, the search engine stores information about it — the words on the page, the page's title, links to other pages, and metadata like when the page was last updated. This stored information is called the index. The index is organized so the search engine can find pages fast. When you search for "how to fix a leaky faucet," the search engine doesn't re-read the entire web; it looks up that phrase in its index and returns pages that contain those words, ranked by relevance.
Relevance ranking depends on many factors: how often your search terms appear on the page, whether they appear in the title or heading, how many other pages link to that page, and how recent the page is. Google's ranking system is called PageRank, and it treats links from popular pages as a vote of confidence. A page linked from many trusted sites ranks higher than a page with the same words but fewer links.
Where your search history is stored
When you search, the search engine records what you searched for, the date and time, your approximate location (based on your IP address), and the device you used. If you're signed into a Google account, Facebook account, or Microsoft account while you search, that search is linked to your account and stored in your account's activity log. If you're not signed in, the search engine typically links the search to your IP address — a unique number assigned to your internet connection — and your device's browser fingerprint.
Google stores this data in its servers, which are located in data centers around the world. The data persists even after you close your browser. Google says it keeps search history for a default period (which varies by product and region, but is often around 18 months), then deletes older records. However, other copies of your data may exist in backups or in aggregated form used for research and product improvement.
Bing, owned by Microsoft, stores search history similarly. DuckDuckGo, by contrast, says it does not store IP addresses or search history at all — it deletes search queries within 30 days and does not link searches to a user profile. The difference in what gets stored is why some people choose to use DuckDuckGo or other privacy-focused search engines.
Why search engines keep your search history
Search engines store your history for two main reasons: to improve their product and to sell advertising. On the product side, your search history helps the company understand what people are looking for, what results are actually useful, and where the search engine is failing. If millions of people search for something and then when ready search for something else, that tells the company the first search didn't work well.
On the advertising side, your search history is valuable because it shows what you're interested in. If you search for "running shoes," "marathon training," and "sports injuries," an advertiser selling running gear knows you're a potential customer. Search-based advertising is more targeted than other forms because it's based on what you're actively looking for right now, not just what you've looked at in the past. This makes search ads more profitable than display ads, which is why Google's search business generates more revenue than any other part of the company.
Your search history is also used to personalize your results. If you've searched for "Python programming" many times, a search for "lists" will show programming documentation rather than shopping results. Personalization makes results more relevant to you, but it also means two people searching for the same thing may see different results.
How to see and delete your search history
Google stores your search history in your Google Account under "My Activity." To view it, go to myactivity.google.com while signed in. You'll see a timeline of everything you've searched for, every YouTube video you've watched, every email you've sent, and every place you've visited if you use Google Maps. You can delete individual searches by clicking the trash icon next to each one, or delete all searches from a specific date range using the delete options at the top.
To stop Google from storing new searches, go to your Google Account settings, find "Web & App Activity," and turn it off. When this setting is off, Google says it will not store your search history going forward. However, Google will still process your search to return results; it just won't keep a record of it linked to your account. If you're not signed in, Google still stores searches linked to your IP address, so turning off Web & App Activity only helps if you're signed in.
Microsoft's Bing search history works similarly. You can view and delete your history at account.microsoft.com under "Privacy & Security." DuckDuckGo does not offer a history page because it says it doesn't store searches in the first place, so there's nothing to delete.
Private browsing mode and search history
Private browsing (called Incognito in Chrome, Private in Firefox, and InPrivate in Edge) prevents your browser from storing your search history locally on your device. When you close a private browsing window, your browser forgets what you searched for. However, private browsing does not stop the search engine itself from recording your search.
If you search in private mode on Google, Google still receives your search and still stores it on its servers — it's just not stored in your browser's local history. Your internet service provider can still see what you searched for, and so can your network administrator if you're on a work or school network. Private browsing is useful if you share a device and don't want other people who use that device to see your searches, but it doesn't hide your searches from the search engine or from your ISP.
To actually prevent a search engine from storing your search, you need to either turn off search history storage in your account settings (if the search engine offers that option) or use a search engine that doesn't store searches at all.
Search engines that don't store your searches
Several search engines market themselves as privacy-focused alternatives to Google. DuckDuckGo is the most widely used. It says it does not store your IP address, does not create a search history, and does not build a profile of your interests. DuckDuckGo makes money through advertising, but the ads are based on the search term itself (if you search for "running shoes," you'll see ads for running shoes) rather than on a profile of your past behavior.
Startpage is another option. It returns Google search results but strips out identifying information before sending your search to Google, so Google doesn't know who searched. Searx is an open-source search engine that aggregates results from multiple search engines without storing searches. These alternatives are slower than Google and sometimes return less relevant results, because they don't have the same scale or the same ability to personalize based on your history.
The trade-off is real: Google's results are often better because Google knows what you've searched for before and can use that context. A privacy-focused search engine gives you the same results as everyone else searching for the same term. Which trade-off you prefer depends on how much you value privacy versus result quality, and how comfortable you are with Google knowing what you search for.
Frequently Asked Questions
Can search engines see what I search for if I use a VPN?
A VPN hides your IP address from the search engine, so the search engine can't link your searches to your location or internet connection. However, if you're signed into a Google account or other account while using the VPN, the search engine still knows who you are and stores the search in your account. A VPN helps with privacy only if you're not signed in.
Does clearing my browser history delete my search history from Google?
No. Clearing your browser history deletes searches stored on your device, but does not delete searches stored on Google's servers. To delete your search history from Google, you must go to myactivity.google.com and delete it there. Browser history and search engine history are two separate things.
Why do my search results look different on different devices?
Search engines personalize results based on your search history and location. If you've searched for different things on your phone than on your laptop, you'll see different results for the same search term. Signing out of your account before searching removes some personalization, but location-based personalization still happens based on your IP address.
If I delete my search history, does Google forget about me?
Deleting your search history removes the record of individual searches, but Google still has other data about you — your email, your YouTube watch history, your location history if you use Maps, and your activity on other websites that use Google Analytics or Google ads. Deleting search history is one step toward limiting what Google knows, but it's not the same as opting out of all Google tracking.
What's the difference between search history and browsing history?
Search history is the record of what you've searched for in a search engine. Browsing history is the record of websites you've visited. Your browser stores browsing history locally; the search engine stores search history on its servers. Clearing one does not clear the other.