Baidu (BIDU 1.02%) is often called the "Google of China" because it owns the country's largest search engine. Like its American counterpart, it also owns a sprawling ecosystem of cloud and media services.

I compared Baidu to Google's parent company Alphabet (GOOG 1.25%) (GOOGL 1.27%) last November. I declared Alphabet was a better all-around investment because it was generating stronger ad sales than Baidu, but my prediction clearly missed the mark.

Baidu's stock has rallied nearly 90% since I wrote that article, but Alphabet's stock has advanced just 15%. Let's see why the bulls favored Baidu over Alphabet, and whether or not that trend will continue.

A woman and child use a computer together.

Image source: Getty Images.

Why is Baidu attracting so much attention?

Baidu's revenue declined year over year in the first half of 2020, but turned positive again in its third and fourth quarters. That recovery brought back some bulls, but its core advertising business is still struggling and its total revenue growth stayed flat for the full year.

Baidu generated 68% of its revenue during the year from its online marketing services segment, which mainly sells ads. The segment's revenue has declined year over year for seven straight quarters.

That ongoing slowdown is troubling, since Baidu's advertising rivals -- like Tencent and Bilibili -- both expanded their advertising businesses over the past year. It also indicates people are spending less time on traditional online searches and more time on other digital platforms.

A laptop user accesses a streaming video.

Image source: Getty Images.

Baidu previously relied on its video streaming platform iQIYI to pick up the slack. But iQIYI's growth decelerated over the past year and forced Baidu to rely on its smaller cloud business to offset the sluggish growth of its online marketing business instead. That strategy could squeeze its margins, since Baidu Cloud is still an underdog in China's cloud market and likely remains unprofitable.

Based on these facts, Baidu's rally might seem odd. But a trio of catalysts appear to be driving it. First, Baidu expects its revenue to rise 15%-26% year over year in the first quarter, which implies its core advertising business will grow again.

Second, it launched a new joint venture to develop driverless EVs in China -- which made it a target in the recent buying frenzy in EV-related stocks. Lastly, Baidu believes it can generate fresh revenue growth with its upcoming takeover of the live streaming platform YY Live.

Analysts expect Baidu's revenue and earnings to rise 18% and 6%, respectively, this year. The stock was trading at historically low valuations prior to its latest rally, and it still looks reasonably valued at 21 times forward earnings.

Why weren't investors as excited about Alphabet?

Google's advertising business, which generated 80% of Alphabet's revenue in 2020, suffered a slowdown in the first half of the year as companies purchased fewer ads throughout the pandemic.

But the growth of Google Cloud, which ranks third in the cloud infrastructure market behind Amazon (AMZN 1.30%) Web Services (AWS) and Microsoft (MSFT 1.65%) Azure, partly offset its sluggish ad sales.

A laptop user accesses a search engine.

Image source: Getty Images.

Google's advertising business recovered in the second half of the year as more businesses reopened, Google Cloud continued to expand, and Alphabet's total revenue rose 13% for the full year.

Google Cloud's revenue rose 46% to $13.1 billion, or 7% of Alphabet's top line, during the year. That was faster than AWS' growth rate but slower than Azure's growth rate in their latest fiscal years.

Analysts expect Alphabet's revenue and earnings to increase 24% and 19%, respectively, this year as its advertising sales accelerate again. That outlook seems stable, and the stock still doesn't seem expensive at 25 times forward earnings.

But four major challenges seem to be curbing investors' appetite for Alphabet's stock. First, Alphabet still faces antitrust challenges in the U.S. and Europe, which could result in big fines or tighter restrictions on its search engine, targeted ads, and Android-related businesses.

Second, Apple's upcoming update for iOS14, which will let users opt out of data-tracking apps, could impair Google's ability to craft targeted ads for iOS users. Third, Google Cloud could rack up more losses as it tries to keep pace with AWS and Azure in the cloud platform market.

Lastly, rising bond yields are sparking a rotation from higher-growth tech stocks to defensive value stocks. This shift could potentially hurt Alphabet more than Baidu, since the latter still trades at slightly lower valuations.

The winner: Alphabet

I underestimated Baidu's potential to rally over the past few months, since I mainly focused on its core weaknesses instead of its low valuation. But I'd still like to see Baidu's advertising business recover before I turn bullish on the stock, regardless of how lucrative its driverless, EV, and AI plans might seem.

I personally own shares of Baidu, but I wouldn't be comfortable adding more shares now. Meanwhile, Alphabet's stable growth, market-leading positions across multiple markets, and reasonable valuations should all make it a safer bet than Baidu over the next few quarters.