Site & Domain Scoping

Search Techniques

Chapter 3 · Site & Domain Scoping

seo1-7 covered clean URL structure, internal linking, and site architecture from the building side — how to shape a site so it's easy to crawl and easy to link between. This chapter picks up the exact same underlying concept — a site's own domain and URL structure — and uses it from the other side entirely: as a filter typed directly into a search query.

The site: Operator

site: restricts results to one domain. site:developer.mozilla.org flexbox gap searches only within MDN's own domain for pages about flexbox and the gap property, instead of searching the entire web and hoping MDN happens to rank near the top.

QueryWhat it searches
flexbox gapThe entire indexed web
site:developer.mozilla.org flexbox gapOnly pages on developer.mozilla.org
No space after the colon
Same failure mode as Chapter 2's minus operator: site: developer.mozilla.org with a space breaks the operator. It has to be typed as one unbroken token — site:developer.mozilla.org — with no space between the colon and the domain.

Domains vs. Subdomains vs. Paths

site: matches by domain, and a subdomain is a different domain as far as this operator is concerned. site:blog.example.com does not also return pages from docs.example.com — each subdomain has to be scoped separately, or scoped one level up if the goal is genuinely every subdomain at once.

ScopeQuery
One exact subdomain onlysite:blog.example.com
The whole domain, every subdomain includedsite:example.com
Narrowed further to one path prefixsite:example.com/blog
Directly reusing seo1-7's own vocabulary
seo1-7 taught the difference between a domain, a subdomain, and a URL path as a site-architecture decision — where to put content when building the site. Here, that exact same structural vocabulary determines how precisely a query can be scoped once the site already exists.

Excluding a Site Instead of Scoping to One

Combining site: with Chapter 2's minus operator excludes a domain rather than restricting to it. python sorting algorithms -site:pinterest.com is a genuinely common real fix when a topic's results get crowded out by a low-relevance site that happens to rank broadly across many unrelated queries.

A Practical Use: Checking What's Actually Indexed

site:example.com on its own, with no other search terms at all, returns a rough listing of the pages from that domain currently sitting in the search engine's index. This isn't a precise or complete audit tool, but it's a fast, no-setup way to sanity-check whether a page you'd expect to be indexed actually shows up — directly relevant to seo1-5's own crawlability/indexability material, checked here from the outside rather than from server logs or Search Console.

Combining site: With an OR Group

Scoping to more than one site in a single query needs the OR operator from Chapter 2, grouped in parentheses so it's clear the OR applies to both site: terms together rather than to the rest of the query: "memory leak" (site:stackoverflow.com OR site:github.com) searches two trusted sources for the same exact phrase at once.

An honest caveat
site: is a strong filter, not a perfectly airtight one — a search engine can occasionally surface a small number of results that don't strictly belong to the scoped domain, particularly for very broad or very low-traffic sites. Treat it as a highly reliable narrowing tool, not a mathematically exact one.

Hands-On Exercises

Exercise 1

Write a query that searches only Stack Overflow for the exact phrase "connection timed out," and explain why each part of the query is necessary.

📄 View solution
Exercise 2

Explain why site:blog.example.com would not return a result that actually lives at docs.example.com, even though both are part of the same overall organization's web presence.

📄 View solution
Exercise 3

Explain precisely how this chapter's use of "domain," "subdomain," and "path" connects to seo1-7's own material — what changed between the two chapters, and what stayed exactly the same?

📄 View solution

Chapter 3 Quick Reference

  • site:domain.com — restricts results to one domain, no space after the colon
  • A subdomain counts as a separate domain for scoping purposes — scope one level up to catch every subdomain at once
  • -site:domain.com — excludes a domain instead of restricting to it
  • site:domain.com alone, no other terms — a quick, rough check of what's currently indexed from that domain
  • Group multiple site: terms in parentheses with OR to search several domains in one query
  • Next chapter: Content-Location Operators