From the car park, the headquarters of search company Google look like just any one of several anonymous low-rise office buildings in a Silicon Valley business park. But set foot inside the door, and it feels like you're taking a step back in time.

Enter the lobby, and on the right there's a grand piano that employees - regularly - pop down to play, to let off steam. To the left there are lava lamps in the corporate colours, arranged around the curvy red sofas. Above the receptionist, a (carefully filtered) scrolling display shows a tiny percentage of the 150 million queries being entered into the Google search box every day.

Inside, the superb lunches in the canteen are served by the guy who used to do food for the Grateful Dead on tour, and upstairs a kitchen stocked with supplies of soft drinks, breakfast cereal and sweets keeps the techies fuelled round the clock.

Home-made gadgets sit in the corridors, like the screen that sports a map of the world covered in blinking lights, showing where searches are coming from. Granted, you're not stepping back very far in time, perhaps - just a couple of years back when all dot.coms felt this carefree. But Google would doubtless claim that, unlike their dead and dying Silicon Valley neighbours, they have earned the right to the quirky, occasionally lavish, perks around their Googleplex, in Mountain View, California.

The company is now celebrating what it claims is a full year of profitability - although, because it is privately owned, it does not release financial details. But, when pressed, Omid Kordenstani, a senior vice president of the company, is more specific about what the search engine has achieved in the past 12 months:

"From the beginning we have had a focus on having a solid business model. This past year, 2001, we were solidly profitable all year, both on an operating basis and a net income basis."

He should understand the scepticism. A profitable dot.com is a rare thing. For one founded only in late 1998, and - worse - a dot.com that includes advertising as one half of its business plan, Google's progress is a feat. But then it could be argued that Google has been flying in the face of conventional wisdom since its launch.

Google, a bare-bones search with a front page largely devoid of anything - adverts, much text, flashy graphics, even a plurality of search boxes - first appeared as the result of a research project in early 1998. This was at the height of the portal craze - a big is beautiful trend that was transforming the net's biggest names, like Yahoo and AltaVista, into the multi-faceted megasites we know today.

The assumption then was that the business of finding things for users and sending them on their way, off their own site, would never make money.

"I remember Google being called anorexic," says Craig Silverstein, the company's director of technology, "which wasn't a very positive way to describe it."

But it appears to be this intense focus on the business of finding things on the web that has allowed Google to go on and actually make a - profitable - business of finding things. Search is all that Google does, albeit through a growing range of mediums, from the web to Usenet newsgroups, via mail order catalogues and news headlines.

"When we started, there were search engines out there already," says Silverstein. "We certainly weren't at the vanguard of searching the web. But the search companies that existed were branching out to become portals, and they were pretty much of the opinion that search wasn't good enough. But we didn't believe that at all.

"Based on the experience with Google when it was a research project at Stanford, there was a highly noticeable increase in relevance that really made a difference to users' life. We have no reason to believe that will not continue to be the case."

This focus has brought a lot of benefits to Google, even in - perhaps especially in - the post-bubble internet world. By concentrating on improving its search technology, it is now acknowledged by many as being the best search engine on the web.

That reputation has seen traffic grow at an extraordinary rate: one wall at the Googleplex is covered by a vast hand-coloured chart, which rises to the right like an imposing mountain range, showing the growth in numbers of page views. It is annotated by employees and regular visitor Al Gore, who is a friend of chief executive Dr Eric Schmidt.

And the focus has also brought benefits to the company's balance sheet. The company raised $1m in 1998, at the very beginning, and a further $25m from venture capital firms in early 1999, but has not needed any more cash since. By avoiding the expensive business of "content" - like the portal staples of news, weather and sports reports - Google's staff only numbers around 270, rising gradually as the company looks to develop its overseas operations. Much of the site's rapid growth has been due to deals with bigger sites like Yahoo, who pay Google for every search they refer.

Vitally, focus has also brought the kinds of revenue the search pioneers thought did not exist in the humble world of search. By turning Google's PageRank technology (see panel) to serving up highly relevant advertising - presented in a unobtrusive way without the use of the banner ad - the company claims a far greater success rate for its advertisers.

Google boasts that it gets five times the industry average number of clicks on its advertisements. With the average banner ad boasting a "clickthrough" rate of less than 1%, some in the online advertising industry now say the number of times an ad is seen - rather than clicked on - is more important than clickthrough. But Google's Kordenstani claims the higher average indicates greater interest in the advertisements the site serves up. The company claims this is down to a focus on results.

"There is definitely this trust that Google has results that are clean, that are not biased by advertising, that the ads themselves are useful and that if I click on it I'll find something," he says. "We actually turn money away when we can't have something targeted.

Sometimes people want to put an ad on a large class of queries because they feel that as long as they hit a large set of - say - shopping queries they'll hit their target. But, for instance, if you want to buy a Palm Pilot and you do a query for 'palm', we'll only show you palm-related ads."

The continued concentration on the business of results appears to permeate every level of Google, from the researchers through to the business development people. Google, itself born out of a university research project, appears aware of the danger that another research project could come up with something better still, and leave Google looking as cumbersome as it has such rivals as AltaVista.

Take, for example, a new generation of search engines, which are aiming to combine the search power of Google with further refinement of the results served up. WiseNut is one newcomer regarded by some as second only to Google for the breadth of its search results. But it also bunches what it finds under specific classes of result, making its results easy to browse.

Meanwhile Vivisimo - the product of a group of academics at Carnegie Mellon University - uses the results of other search engines, but clusters them to make the results easier to browse. Teoma looks and works in a similar way to Google, but adds page ranking depending on what experts in particular fields recommend. And Daypop targets a Google weak ness - news searches - to great effect.

Danny O'Sullivan, editor of Search Engine Watch, is full of praise for Teoma and its relevancy, and suggests they could challenge Google as investment allows them to broaden their index.

Likewise, he says Alltheweb has made great advances in the past 12 months, making it his second-favourite web crawler. But, for now, Google remains top of the pile and is going "from strength to strength".

"You find yourself thinking 'thank God they are around'. And that's what I constantly hear," says Sullivan. But Google's huge popularity could also cause a problem for the site, he warns.

"This leads to one of the only major concerns you would have - you look at Google's dominance of search and people are extremely positive about it. Yet they have a dominance that is almost Microsoft-like in nature. And that's a company people generally don't like.

"Part of their business is selling search. Now they're the dominant search, that's going to become more difficult. They can't say [to partners] 'we're not competing with you'.

Yahoo could look at Google and say: 'you've got really good results, in fact we even agree you've got better results than everyone else, but you're competing with us, you cost us, and we think we're better off partnering with Alltheweb'."

Negotiation of a new deal with Yahoo, due for this summer, will give an indication of whether Google is feared as the Microsoft of search, or still admired as being the best of the bunch. Ahead of that, at the Googleplex the intensive research goes on - between roller hockey in the car park and visits to the in-house, full-time masseuse - to keep on cataloguing.

"We're still at the stage that everyone agrees that there is good content out there that isn't indexed yet," says Silverstein.

"One day we think people will look back on the indices that exist now and wonder how we managed to get anything done. I don't know when that day will be, but I do believe that there are still big jumps that people will really notice, and will make differences to their lives. "There's so much to do, and we're happy to remain focused on that."

How Google works

What makes Google so effective at finding what you want? It boils down to the complexity of the index it creates as it explores, or "crawls", the web.

Other web crawlers index the pages by counting the number of times particular words appear in the code. For instance, were a user to enter "Online" in the search box, a page containing the word "Online" 10 times would appear above one containing the word five times.

However, that makes it easy for unscrupulous web page editors to fool the search engine into giving them high rankings, because they can repeat words many times, either on the page or hidden in its code. They can thus appear high up on searches even if their page is irrelevant.

Google works differently. It also looks at the content of a page, although it tries to see it from the user's point of view. Therefore, if a word appears in bold type on a web page, it ranks that word as being particularly important for that page. If a word does not display on the page, it ignores it.

More importantly, Google also uses the structure of the web to determine the importance of a given page. Google counts the number of links to a page from other sites, counting each link as a vote. So if site one links to site two, that's regarded as a vote for site two by site one.

Furthermore, if site one is itself a popular, well linked-to site, then the votes it casts for other sites are regarded as more important. That means a link from -say -the Guardian's web site to a personal home page counts for much more in Google's eyes than that home page's link to the Guardian.