Superior Searching - Searching Titles, Text and Anchors
(Page 9 of 14 )
As explained in the Advanced Search section above, titles are different from URLs. They’re also handy to search when you want pages that really focus on your topic. Use the operator
intitle, like this:
intitle:file intitle:sharing
or
intitle:"file sharing"
The first example finds titles that contain both or your words. The second example finds titles that contain the exact phrase file sharing.
A variation of this syntax, allintitle, finds pages that have all your keywords or phrases in the title, in any order. For example—
allintitle:file sharing
—finds titles that contain both “file” and “sharing,” without requring an operator before each word (as in, intitle:file intitle:sharing).
Tip: If you try to mix allintitle with some other syntax and the search conks out, you can put intitle before each keyword or phrase (intitle plays better with syntax other than allintitle).
Searching Text The
intext operator searches only the body text of Web pages, ignoring links, URLs, and titles. Use this syntax when you want to find a word that might crop up in zillions of URLs or links, like this:
intext:amazon
or
intext:amazon.com
Its cousin, allintext, works similarly to allintitle, but it has unpleasant issues when you try to mix it with other syntax.
Searching Anchors “Link anchor” is HTMLese for the words and pictures on a Web page that serve as links to another page. Mostly, a link anchor is just what you think of as a link (usually a blue, underlined word or phrase that describes a related, linked page), but a lot of times they turn up as buttons or icons or images, too.
The inanchor operator searches for text in link anchors. It’s a nifty way to get an idea of which or how many pages link to a person, place, or thing. And sometimes, it can help you find a person’s email address, since most Web pages consider email addresses to be links. Use it like this:
inanchor:"Linkin Park fans" inanchor:"Richard Stallman"
Not surprisingly, Google has an allinachor option. Bear in mind that the keywords you specify for it must all appear in a link anchor in order to show up in your results.
Searching Within Sites and Domains Like the Domain feature on the Advanced Search page (described on page 52), the
site operator lets you specify a site or domain you want to search. It makes a quick and handy search function for sites that don’t have a search feature.
Unlike the previous operators, the site syntax has two parts. One, you have to attach a site name or domain name to site: And two, you have to include the keywords or phrases you want to search for. Here are a couple of examples:
site:nba.com "larry bird" magic site:gov "agricultural subsidies"
Tip: You don’t have to include http:// or www. And you don’t have to put the site name in quotes.
You can also use
site to
exclude a particular Web site from your search. For example, if you want to look for sites about books, but you don’t want to wade through zillions of results from Amazon, this query—
books -site:amazon.com
—does the trick. Mostly. It doesn’t block Amazon’s international partners, like Ama-zon.co.uk, because that’s not the site you specified. To nix all instances of Amazon in a URL, use the inurl operator, as described on page 64.
You can’t use the site operator to search within sites’ subdomains (also called subdirectories), which is anything at the end of a site name after a slash (/). For example, the query feedback site:ebay.com/help gets you nada. For these situations, use the inurl syntax.
 | If you've enjoyed what you've seen here, or to get more information, click on the "Buy the book!" graphic. Pick up a copy today!
Visit the O'Reilly Network http://www.oreillynet.com for more online content. |
Next: Searching URLs >>
More Google Optimization Articles
More By OReilly Media