Alphabet Inc.’s Google tallied historic sales growth and nearly doubled its profit in the third quarter, as smaller businesses poured money into digital ads aimed at customers whose purchases have shifted online.

The strong results underscored how the pandemic has turbocharged the company’s core advertising business. With retail foot traffic dwindling, marketers turned to Google to promote their products, delivering in a single year the kind of quarterly sales growth that the search giant typically records over a two-year...

Alphabet Inc.’s Google tallied historic sales growth and nearly doubled its profit in the third quarter, as smaller businesses poured money into digital ads aimed at customers whose purchases have shifted online.

The strong results underscored how the pandemic has turbocharged the company’s core advertising business. With retail foot traffic dwindling, marketers turned to Google to promote their products, delivering in a single year the kind of quarterly sales growth that the search giant typically records over a two-year span.

Alphabet said Tuesday that revenue rose 41% to $65.12 billion, its largest in 14 years. It posted a profit of $21.03 billion, nearly three times what it reported before the pandemic.

The red-hot digital-ad market has accelerated this year, with global spending on track to grow 26%, up from earlier projections of 15%, according to GroupM, a media-buying firm. Much of that windfall has flowed to Google, which has a dominant share of world-wide internet searches, digital navigation and online video viewership.

The company’s ad business—led by Search, Maps and YouTube—posted $53.13 billion in sales from advertising, a 43% increase.

Much of Google’s growth has come from e-commerce advertisers eager to reach customers whose product searches begin online. The company joined with Shopify Inc. this year to simplify search listings and ad purchases for 1.7 million merchants. The effort, which aimed to enliven its e-commerce segment, has helped turn retail ads into Google’s largest growth contributor.

In recent months, the search giant’s retail-ad segment has benefited from the new privacy policy Apple Inc. rolled out. Since April, the iPhone maker has required apps to ask users whether they want to be tracked. The changes have weakened the performance of ads on Facebook Inc. and Snap Inc., according to ad buyers and smaller businesses. Many brands have shifted spending to Google as a result.

“In the land of the blind, the one-eyed man is king,” said Brian Wieser, GroupM’s global president of business intelligence. “Whatever data they have [at Google] is better than what most others have.”

YouTube has been another major driver of Google’s advertising gains. The video behemoth reported sales grew 43% to $7.21 billion in the quarter. The business is on track to generate nearly as much revenue this year as Netflix Inc., a subscription business valued at nearly $300 billion.

From the Archives

Apple and Google have one of Silicon Valley’s most famous rivalries, but behind the scenes they maintain a deal worth $8 billion to $12 billion a year according to a U.S. Department of Justice lawsuit. Here’s how they came to depend on each other. Photo illustration: Jaden Urbi The Wall Street Journal Interactive Edition

While Snap and Facebook warned that Apple’s rules would crimp future sales, Google has yet to signal whether it expects to be affected. The company relies on data from iPhones and iPads to target and measure some inventory it sells. As a result, analysts expect its search business to be unaffected but its YouTube and mobile-ad placement businesses to suffer.

Regulators and lawmakers present perhaps the biggest challenge to Google’s continued business success. Last week, Texas and more than a dozen state attorneys general filed an unredacted complaint against Google. They highlighted how the company takes a 22% to 42% cut of ad spending that goes through its system, two to four times as much as competing ad exchanges.

Google also faces antitrust suits from the Justice Department and a separate coalition of states, alleging that the company has struck secretive agreements to favor its search engine and advertising businesses and thwart competitors. In July, a third coalition of states led by Utah filed a lawsuit targeting Google’s Play app store.

Google has called the lawsuits flawed and said it collects lower fees for ads than the industry average. In reference to the app-store suit, the company said its open operating system lets customers download apps directly from developers’ websites.

The company already has made changes to its business that address some regulatory criticism. Last week, it reduced its cut of app-subscription fees to 15% from 30%, a move that analysts expect to cut into total revenue next year.

Investors have largely discounted such changes, so long as Google’s core search business remains strong. Alphabet shares have risen nearly 60% this year through Monday’s close.

“The hardest challenge for Google, alongside managing regulatory animus, is the law of large numbers,” said analyst Richard Kramer, founder of London-based advisory firm Arete Research. In the absence of competitive threats, he said the question is: “How do they sustain growth when 10% growth means finding another $10 billion in revenue?”

New bets for Google have yet to show that kind of potential. Nearly a decade after it began developing driverless cars, the tech giant’s Waymo subsidiary is yet to charge riders at scale. Its Verily Life Sciences unit, which conducts health research, hasn’t generated the kind of transformational sales it would need.

Google’s cloud-computing business has shown the most promise. After investing heavily over the past few years, the division has begun to gain market share behind leaders Amazon.com Inc.

and Microsoft Corp. , which account for 41% and 20% of the market, respectively.

Google, which lags behind with 6% share, reported that cloud sales rose 45% to $4.99 billion in the period.

Write to Tripp Mickle at Tripp.Mickle@wsj.com