By default, when you do a query in Google, it will search the entire internet. The results you get will of course be tailored to your preferences (including the sites Google knows you're more likely to visit), your geographical location, etc. But you basically get whatever Google thinks are the best results for you. Google supports "search operators" that let you fine-tune your searches. The "site:" operator is one of them: it limits results to a single domain (just one site!)
You can use Google the way you normally do: using double-quotes for exact matches, only showing certain file types in the search results, etc. All you have to do is add a website restriction in your query. For example, let's search this website for the word "tips". To make sure that only results from this site show up, type this inside the search box: tips site:in5stepstutorials.com
Notice two things in the search results (screenshot). First, only pages from a certain site you specified are shown as result. Second, like normal searches, Google highlights in bold letters the matches found in the page, in their context.
You may already know that the hyphen / minus sign lets you exclude some terms from the results. That exclusion also works with the "site:" operator. Say you want to search the website example.org, but that you don't want to get results from their forum pages, located at forum.example.org. Here's how you'd search for the word "tips" in their main site, while ignoring Google results from their forum subdomain: tips site:example.org -site:forum.example.org
- You can only search one domain at a time, but multiple subdomain exclusions are ok (e.g., no results from reviews.example.org AND forum.example.org).
- Whenever you see a Google search box in a website, it typically performs a site-restricted search behind-the-scenes. That's why you only see results from that particular site. That's something site owners set up when adding the box.
- Yahoo and Bing web searches also support the "site:" operator.