How does GOOGLE know ?
Good question - which I duly 'googled' to find:
"Crawler-based search engines, such as Google, create their listings automatically. They "crawl" or "spider" the web, then people search through what they have found.
If you change your web pages, crawler-based search engines eventually find these changes, and that can affect how you are listed. Page titles, body copy and other elements all play a role.
Crawler-based search engines have three major elements. First is the spider, also called the crawler. The spider visits a web page, reads it, and then follows links to other pages within the site. This is what it means when someone refers to a site being "spidered" or "crawled." The spider returns to the site on a regular basis, such as every month or two, to look for changes.
Everything the spider finds goes into the second part of the search engine, the index. The index, sometimes called the catalog, is like a giant book containing a copy of every web page that the spider finds. If a web page changes, then this book is updated with new information.
Sometimes it can take a while for new pages or changes that the spider finds to be added to the index. Thus, a web page may have been "spidered" but not yet "indexed." Until it is indexed -- added to the index -- it is not available to those searching with the search engine.
Search engine software is the third part of a search engine. This is the program that sifts through the millions of pages recorded in the index to find matches to a search and rank them in order of what it believes is most relevant. You can learn more about how search engine software ranks web pages on the aptly-named How Search Engines Rank Web Pages page.
All crawler-based search engines have the basic parts described above, but there are differences in how these parts are tuned. That is why the same search on different search engines often produces different results. Some of the significant differences between the major crawler-based search engines are summarized on the Search Engine Features Page. Information on this page has been drawn from the help pages of each search engine, along with knowledge gained from articles, reviews, books, independent research, tips from others and additional information received directly from the various search engines."
Heres the link for the How Search Engines Rank Web Pages page:
http://searchenginewatch.com/webmasters/article.php/2167961if you read the article, it basically says that the ranking algorithms are blummin complicated.. and often a secret! Furthermore, search engines actively penalise attempts to artificially up the rankings of your site. Generally though, ranking seems to be done by the following criteria
PAGE TITLE - does it match the search string?
Content - Do the words of the search string appear anywhere in the page content.
Frequency - How often the word(s) appear (but there are anti-spamming safeguards, so putting the same word 100s of times won't work)
More complicated Engines like google probably also use statistical methods to increase the rank of certain pages (like how often the page has been picked from a search engine shortlist.)