Cybersecurity companies are generally resistant to economic downturns, because their clients won't shut off their digital defenses to save a few dollars. Increasingly complex cyberattacks will also drive more companies to upgrade those defenses.

However, it can also be tough for investors to spot the best long-term plays in the fragmented cybersecurity sector. So today, I'll review three straightforward plays on this growing market -- Microsoft (MSFT 1.30%), Cloudflare (NET -0.11%), and Zscaler (ZS 0.23%) -- and explain why they're still reliable investments.

An illustration of a digital padlock.

Image source: Getty Images.

1. Microsoft

Most investors might not consider Microsoft to be a cybersecurity company, since it generates most of its revenue from its cloud-based services, Windows OS, and Xbox gaming products. However, that sprawling ecosystem also serves as a launchpad for Microsoft's growing portfolio of first-party cybersecurity tools.

Microsoft's software was circumvented by a series of hacks in recent years, but it's been plugging up those holes by acquiring a long list of cybersecurity companies, upgrading its own Defender antivirus software for Windows, and setting aside $20 billion for cybersecurity investments three years ago. It subsequently entered the network security market with its own Entra identity management, edge networking, and network access services for its Azure cloud infrastructure platform.

If Microsoft addresses its recent hacks, continues to acquire smaller cybersecurity companies, and upgrades its tools with OpenAI's integrated generative AI tools, it could gradually reduce the need for third-party cybersecurity services. If that happens, Microsoft could represent a well-balanced way to invest in the secular growth of the cloud, enterprise software, AI, gaming, and cybersecurity markets. Analysts expect its earnings to grow 11% in fiscal 2024 (which ends this June) and 15% in fiscal 2025 -- and its stock still looks reasonably valued relative to its industry peers at 31 times forward earnings.

2. Cloudflare

Cloudflare's cloud-based content delivery network (CDN) accelerates the delivery of digital photos, videos, and other content for websites and apps. It accomplishes that by storing cached copies of the digital content on edge servers, which are physically located closer to its users than the origin servers.

Cloudflare might not sound like a cybersecurity company, but its CDN also blocks websites from bot-based attacks. If you've ever been asked to prove that you're a human before visiting a website, you've likely encountered its defenses. Cloudflare claims that approach, which it often compares to a "water filtration" system for the internet, will gradually reduce the need for traditional cybersecurity services.

From 2019 to 2023, Cloudflare's revenue grew at compound annual growth rate (CAGR) of 46%. Analysts expect its revenue to continue growing at a CAGR of 28% from 2023 to 2026 as it continues to tether more websites to its platform.

Cloudflare's stock isn't cheap at 18 times this year's sales, and it isn't profitable on a generally accepted accounting principles (GAAP) basis yet. Nevertheless, the rise of more media-intensive websites, higher internet speeds, and more disruptive bot-based attacks could all drive more companies to adopt its CDN services and boost its long-term revenue growth.

3. Zscaler

Zscaler provides "zero trust" services, which tag everyone -- including a company's top executives -- as potential threats. But unlike many of its peers that install those tools through on-site appliances, Zscaler only provides its services through cloud-native subscriptions that don't require any hardware installation.

That streamlined approach is stickier, cheaper, and easier to scale as an organization expands. From fiscal 2019 to fiscal 2023 (which ended last July), its revenue grew at a CAGR of 52%. Analysts expect its revenue to rise at a CAGR of 27% from fiscal 2023 to fiscal 2026, even as the near-term macro headwinds make it tougher to gain new customers.

During the company's latest conference call, CEO Jay Chaudhry said it wasn't experiencing any "significant pressure" on its big deals, and that zero trust remained a "top priority" for many companies. But like Cloudflare, Zscaler isn't profitable on a GAAP basis yet -- and its stock also isn't a screaming bargain at nearly 13 times this year's sales.

Yet Zscaler could still have plenty of room to grow. According to Fortune Business Insights, the global zero trust market could expand at a CAGR of 17% from 2023 to 2030 -- and Zscaler could continue to grow at an even faster clip than most of its peers as it locks more customers into its cloud-native subscriptions.