The song won't remain the same for China's leading search engine.

China's official news agency is reporting that Baidu (Nasdaq: BIDU) and several other sites will be punished by the government for their inability to curb rampant music piracy. Even though Baidu itself isn't serving up illegal downloads, its thorough indexing of third-party websites is contributing to the wider distribution of digital piracy.

We've been here before. Baidu and Sohu.com's (Nasdaq: SOHU) Sogou prevailed in the past, but things have been tense since Yahoo! (Nasdaq: YHOO) came up short four years ago.

We still don't know the severity of the government's punishment. Yahoo! was slapped with a tiny $27,000 fine in 2007. Baidu's cash-rich balance sheet can absorb the resulting tab. The real pitfalls for Baidu shareholders here are the costs related to cleaning up its indexing and the potential drop in traffic as file-hungry music buffs seek their pirated files elsewhere.

The global music industry is in a funk. Digital sales were supposed to help offset the decimation of CD sales, but that's just not happening anymore. Warner Music Group (NYSE: WMG) has posted nine consecutive quarterly deficits, with digital sales taking a sequential dip for three straight quarters.

Baidu is hoping to launch a licensed music service next month. It's a move that will turn Baidu from enemy to friend, but it will always be a frenemy.

Baidu has tried to play nice -- publicly -- in the past. It struck a deal with Viacom's (NYSE: VIA) MTV to provide ad-supported streaming of music and music videos several years ago. That was followed by similar pacts with major labels including EMI and Taiwan's Rock Music Group. It's all been a front, since track seekers know they can count on Baidu's deep-linking efficiency to smoke out unauthorized uploads for free.

There's obviously more at stake these days. Baidu's been a 17-bagger since I recommended it to Motley Fool Rule Breakers subscribers five years ago, hitting a fresh all-time last week. It's a global icon now with hundreds of thousands of advertisers willing to pay top dollar to generate a lead through China's search engine of choice. When Baidu reports its quarterly report this week, analysts see earnings more than doubling. Baidu is too legit to be dogged as a hub for illegal downloads, just as it had to overcome last month's embarrassment over unauthorized works going up in its free literature site.

It's time for Baidu to shake the notoriety.

Should Baidu -- or any search engine -- be held accountable for linking to pirated tracks? Share your thoughts in the comment box below.

Baidu and Sohu.com are Motley Fool Rule Breakers recommendations. Yahoo! is a Motley Fool Global Gains pick. The Fool owns shares of Yahoo!. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.

Longtime Fool contributor Rick Munarriz has only been to China once, but he relishes admiring its dot-com revolution from afar. He does not own shares in any of the stocks in this article. He is also part of the Rule Breakers newsletter research team, seeking out tomorrow's ultimate growth stocks a day early. The Fool has a disclosure policy.