Imagine you meet some people from China and they ask your views on the 1989 demonstration in Trafalgar Square, when the British army killed thousands of people protesting against Margaret Thatcher's poll tax. Then they talk about their spiritual hero, a religious cult leader in Northern Ireland, whom you vaguely recall seeing traduced in the media as a conman. Finally, they congratulate you on the Nobel Peace Prize won by a British thinker of whom you've never heard.

None of what your Chinese friends say about Britain makes sense to you. You go home a little unsettled, but your suspicion that they are deluded - or perhaps just brainwashed - is confirmed by a few Google searches. There is no mention anywhere of the massacre, the religious leader or the thinker.

Sounds implausible? That is the situation in China in relation to Tiananmen Square, the Dalai Lama and Liu Xiaobo - even among the internet-savvy youth. And some responsibility for this state of affairs must fall on the Chinese equivalent of Google, a fast-growing search engine named Baidu.

Just a few months ago, I was in a bar in a provincial Chinese city with a group of postgraduate students at a decent, if not leading, university. After a few drinks, tongues were loose. One particularly feisty MBA student, who had given herself the western name Lily, after Lily Allen, identified herself as a bit of a rebel. "Everybody with education hates the Chinese government," she said.

On my iPad I happened to have a BBC2 documentary from 2009, China's Capitalist Revolution. It was freeze-framed at the point where the lone "Tank Man" is seen in Tiananmen Square. Curious to know what these bright young Chinese knew about the events of that day, and about him, I showed them the footage. They looked confused. "Have you ever seen this?"

I asked. Lily was the first to speak. "I don't get it. What movie is this?" she asked. I explained that it was BBC news footage.

The students remained baffled. There was a wifi connection in the bar, as there is almost everywhere in China, so I logged on to Google. In spite of the "Great Firewall of China", the state apparatus designed to monitor the internet and censor material unwelcome to the authorities, Google often works as well as in the west. But the students stopped me. "No," they all said, "not Google, Baidu."

Baidu dominates the search market in China - all the more so since Google abandoned its mainland-based search operation last year. Its existence is the result of a chance comment made to its chief executive, the US-educated Robin Li. In the early 1990s, Li was working on a Master's degree in computer science at the State University of New York and was stung by a remark from a professor: "Do they have computers in China?" He became determined to change the perception that China was technologically backward.

He went on to work on Wall Street and, according to Baidu, patented an internet search method he called RankDex shortly before a certain Larry Page patented a different method that became Google. When Baidu was set up in 2000, there were fewer than a million internet users in China, but it is now the search engine of choice for some 85 per cent of China's 470 million avid web users, who spend 20 hours a week on average online. It also operates Baidu-branded social networking and other sites. If growth of internet use in China continues on its present curve - that 470 million figure is expected to be 750 million within five years - the Nasdaq-listed Baidu could soon be as big a search monopoly and revenue power plant as Google. Google's profits, at $7bn, currently dwarf Baidu's, which are roughly $0.5bn. In July, however, Baidu reported a 95 per cent increase in quarterly profits, up to $253m, and its shares have jumped 65 per cent this year after more than doubling in 2010.

Let the music play

At about 400 million, Baidu already has almost as many users just in China as the 425 million Google has worldwide. Furthermore, the Baidu-using ranks expand every day as more Chinese citizens become "netizens". So confident is the company of its potential for profits that last month it voluntarily reduced its own income by agreeing to stop linking users to western websites where you can download music illegally, which is almost a Chinese tradition. Instead, Baidu has signed a groundbreaking deal with Universal Music, Warner Music and Sony Music to offer copyrighted songs on a new music platform called Ting! - Mandarin for "listen".

Baidu is China's window on itself and the world, its ultimate arbiter of reality, the source of truth for a quarter of humanity. It is rapidly becoming nearly as important as the Communist Party - perhaps more so, because the broad masses trust it implicitly but grumble incessantly about the ruling elite. "Baidu" means "hundreds of times", and comes from a Song Dynasty poem about searching for a rare beauty among the teeming crowds. Its logo is a friendly-looking paw print.

However, as a de facto Chinese institution, although privately rather than state-owned (it is registered in the Cayman Islands), Baidu is obliged by Chinese law - probably against the will of its westernised principals - to work within the government's ever-stricter censorship parameters, thereby bolstering its obsession with stability and "harmoniousness". The recent celebrations of the Communist Party's 90th anniversary required executives of the country's main internet companies - Li the former Silicon Valley entrepreneur among them - to gather in Shanghai to sing revolutionary songs and wave red flags. Li reportedly declared at the event: "Socialism with Chinese characteristics drives the development of the Chinese internet." It is hard to imagine Mark Zuckerberg of Facebook, who says he would love to extend the site to China, where it is now blocked, going through the same rituals to keep the communist leadership sweet.

China's increasingly vocal consumer jour­nalists sporadically accuse Baidu not just of “collaborating" with the party, but of selling all-important top rankings to state-owned and private commercial interests, including some that sell fake pharmaceuticals. (It is only fair to add that Google's dealings with adver­tisers are similarly being investigated, in its case by the US justice department and the European Commission.)

China's super-intelligentsia see Baidu as working hand-in-glove with both the Communist Party and often disreputable businesses, but any scepticism about its integrity had not affected my group in the bar. So we switched from Google to Baidu and put in the search term "Tiananmen". The students - who were certainly sceptical about these alleged massacres - agreed we could put in the Pinyin (Roman) letters as Baidu works fine with both these and Chinese characters. What came up was hardly surprising - a list of 53 million very interesting tourist and historical references, but none, so far as we could see, related to anything untoward happening in 1989.

More interestingly, when we put in "Tian­anmen" and "1989", every one of the few hundred references was in English or another western language. The results were impressive. Surprisingly, the first one came from the state-controlled People's Daily online, where by paragraph two we were reading that the 1989 "protest by pro-democracy supporters ended when hundreds of these protesters were killed by government troops in the streets leading from the square". The students, none of whom was old enough to remember 1989, were curious, but remained unconvinced because the content we were finding was not in Chinese. When we tried again, with "Tiananmen" in Chinese, we were greeted with a warning in bold Chinese characters that read: "According to relevant laws and regulations and policies, some search results have not been shown."

The internet, and a knowledge-hunting tool such as Baidu in particular, has presented a big challenge to the power of China, even with 50,000 internet police patrolling its electronic borders. This was a country where authority spoke and the public shut up, where the dictator dictated. Not any more. In 15 years it has gone from a culture where hardly anyone had a telephone to one of the most connected societies in the world. Hundreds of millions of people chat, around the clock, with friends and family on QQ, the Chinese Windows Messenger, from their computers and mobile phones. And China has an estimated 200 million bloggers, producing trillions of words a day for public consumption.

Yet such is the high level of patriotism-cum-nationalism that, despite the background noise of complaint about the government and bureaucracy, even dissidents accept a bit of inconvenience, such as being mysteriously excluded from obscure, foreign bits of information on Baidu, as the necessary price of being part of the world's greatest nation. They can communicate and inquire day and night about millions of subjects, from love to business to celebrities to recipes. What does it matter if a few dull, worthy political topics are off-limits because they weirdly upset the powers that be?

Not only that, but even the masses, who remain hazy about recent history, are powerfully aware that the life they live thanks to China's special brand of communism is incalculably better than it would be if China had stuck to hardline Maoism - or had never become communist and remained feudal. Being a Chinese citizen is not easy, but it's fantastic for the vast majority of people compared to any time in recent Chinese history. Their trusted friend Baidu with its big, floppy paw print, plus Tencent QQ and Sina Weibo (the Chinese equi­valents of Twitter) and RenRen and Kaixin (Chinese Facebook), make it that much more fun and sociable. "I love Baidu," Lily told me in the bar, her friends nodding in agreement, "because if you want to know something about China, why would you ask a foreigner or trust what he says? In China, we say, 'If you want to know something, just Baidu.' Nobody would say, 'Just Google.'"

A Baidu TV commercial made some years ago has stayed in many young netizens' minds, even though it never made it on to TV and was shown online only. It shows a bumbling white foreigner, representing Google, trying to pick up a girl at a wedding some time in the Ming Dynasty. He speaks badly accented, ungrammatical Chinese and gets nowhere. Then a character representing Tang Yin, a painter/poet of the era, corrects his Chinese and gets the girl. The message is clear: you need a Chinese search engine for Chinese searches.

Astrid Chang, a mainlander from Beijing who is studying for an MPhil in anthropology at the Chinese University of Hong Kong, has identified what she calls a "nationalist paradox" in the diaspora's dealings with the censored web on the mainland. Even among people who have long lived abroad, she has found, there is still a desire to defend China against foreign criticism, though they may also feel ashamed of their government and recent Chinese history.

At home, she says, "Freedom of speech is much more of a problem than freedom of in­formation. If you're searching for something like entertainment news, or help with a school essay or a new cover for your iPhone, Baidu is fine. And if it's not, people always find a way to discover the truth. They can access Google."

Baidu's director of international communications, the US-born Kaiser Kuo, points out that it is rare for Chinese people to want information about China from overseas sources. The US state department may have pledged $19m in May to help blocked internet content make

it through to China, Iran and other states that censor politically sensitive material, but Kuo suggests that Chinese citizens may be left nonplussed by the move.

“It's a kind of hubris, this belief that truth resides in the world outside China, that everyone must be clamouring to get out," he says. "The fact is that the vast majority of people simply don't bump up against this. They're not interested any more than you are in reading Portuguese-language sites.

“That's not to trivialise the problems of people who do want more information. As with all things, to make sense of how the internet works here you need to have a high tolerance of cognitive dissonance - to be able to keep two contradictory things in your head at the same time. But it's also true that the internet in China has become a fully fledged public sphere where people are exchanging a greater volume of increasingly critical ideas."

China is complicated and its firewall is also vastly more subtle than is often portrayed. Take the 50,000 techies, in and out of uniform, who patrol the web. In truth, this figure understates the numbers who censor content, given that the country's internet service providers are obliged to monitor output on their own networks before it reaches the internet police. RenRen, a social networking site similar to Facebook, has 500 internal monitors.

Cat and mouse

Baidu won't say how many net police it has on its campus outside Beijing, but I learn from a Canadian-Chinese former employee that it operates an automated censoring system on its sites to filter out flagged words, including close homonyms and Pinyin versions.

All posts on Baidu's social networking site go into one of three buckets - green for posts with nothing "unharmonious", red for objectionable and yellow if there is ambiguity, in which case a decision is taken by a human being. A tiny proportion of time is spent blocking problematic foreign content - the company is far more concerned with stopping internal debate online.

Yet China's internet monitors are bound to be defeated by the scale of their task. There are more censors per online head than there are food safety inspectors to protect the population from the much more urgent problem of contaminated food. But, as Kuo points out: "It's a tiny fraction of a per cent of traffic that's monitored. It's a game of cat and mouse, but played on a continent-sized field where there's a handful of cats and just gazillions of mice, most of whom are very smart mice."

Furthermore, there are battles within the bureaucracy over who censors what. At best, it is organised chaos. This year the government announced a new cyber-policing body to oversee the 14 government units that have a hand in controlling the online sphere, but its terms of reference are vague.

According to Lifen Zhang, editor of the Financial Times's Chinese site, which recently moved from London to Beijing: "Different levels and different authorities all have a hand in the fire. It isn't only the foreign media that are subject to heavy-handed censorship. I have heard many examples of government organisations and websites being subjected to the same treatment. At provincial level, people want to make their website credible, so they will try to bypass their internal firewalls."

Ftchinese.com often pushes the censorship boundaries further than other sites yet is rarely blocked - probably, it is thought, because government ministers rely on it for untainted information. During the 2008 Beijing Olympics, Zhang says, it was far more critical of official Chinese conduct than, say, the BBC - but was not blocked.

Discuss internet censorship in China for any length of time, and it becomes difficult not to conclude that the country's attempt to control the web will fail. Within minutes of last month's fatal bullet-train crash near Wenzhou in south-east China, hundreds of thousands of bloggers and micro­bloggers, some of them reporting from inside the wrecked train, drowned out the weak attempts by officials to play down the disaster and developed into a powerful chorus against the government in general. The clamour for transparency over the causes of the crash - along with the inevitable conspiracy theories - was such that, within days, Premier Wen Jia­bao was visiting the scene and explaining, most unusually for a Chinese leader, that he had not been able to make it earlier because he had been unwell.

The comment was widely interpreted as meaning there had been disagreement among the leadership over how to respond to a disaster whose causes, because of the internet revolution, and Twitter-type sites in particular, could no longer be covered up. The Chinese Academy of Social Sciences noted in a report on new media, published just before the crash, that microblogs have become one of the main original sources of information that "arouse public opinion", and that this constitutes "a certain risk to ideological security".

But even in China, web censors are mostly young, and can only be assumed to be curious to know the truth behind such events, once routinely dismissed by official media as "one of those things". "I've met these guys from the secret police, the Public Security Bureau," a Chinese web entrepreneur told me, "and because they know the kind of information that is held back from the public, I'm sure some of them are especially curious, in private, to learn what's really happening in the world."

Those in the private sector helping the government keep a lid on the web are likely to be similarly unwilling to let outright censorship survive much longer. "These are cool guys, but they are working in one of the strictest regulatory environments in the world," the Canadian programmer said of his time at Baidu. "It's not North Korea, not even Iran. But the authorities don't care how you do it as long as it gets done, and the consequences of not getting it done can be dire indeed.

“Nobody there is so stupid as to think the users prefer a sanitised, bowdlerised internet experience. What they want is unexpurgated and Baidu wants to give them that experience in so far as is possible. If that means being liberal in their interpretation of official strictures, then they are. Absolutely nobody there wants to be some willing, eager tool of oppression."

Jonathan Margolis writes on consumer technology for the Financial Times