The historic short squeeze happening at GameStop and other heavily shorted stocks dominated financial headlines over the past week. The coordinated effort, orchestrated by users on Reddit, caused GameStop stock to soar more than 1,600% year to date.

Investors might be tempted to chase those incredible gains, or get in on other short squeeze targets like AMC Entertainment or Nokia, but many of these stocks have essentially become full-blown casinos.

Instead of gambling in the market, investors should stick with stocks that will generate reliable long-term returns. Here are three well-known tech stocks that fit the bill: Palo Alto Networks (PANW 7.33%), Apple (AAPL -0.74%), and Pinterest (PINS -1.31%).

Two kids plug their fingers in their ears as a third kid shouts into a megaphone.

Image source: Getty Images.

1. Palo Alto Networks

I recently chose Palo Alto as my top cybersecurity pick for 2021 for four reasons: It's a market leader in enterprise firewalls; it owns a growing cloud-native security platform; it's expanding rapidly via acquisitions; and it generates robust growth at a reasonable price.

Palo Alto serves more than 77,000 customers in more than 150 countries, and research firm Gartner has named it a "Magic Quadrant" leader in network firewalls for nine straight years. It has spent $2.7 billion on acquisitions since 2019, and many of those purchases have strengthened its Prisma cloud platform and AI-powered Cortex threat detection platform with new features.

Palo Alto revenue rose 18% in fiscal 2020, but its adjusted earnings dipped 10% as it integrated several big purchases. But looking ahead, the company expects its revenue to rise 20% to 21% in fiscal 2021 as its earnings also jump 17% to 19%.

It expects the expansion of Prisma, which widens its moat against cloud-native challengers like CrowdStrike, to drive that growth. Last quarter, it revealed that 70% of the Fortune 100 and 20% of the Global 2000 were already using Prisma, and those ratios should rise as companies tighten their cloud security standards.

Palo Alto stock might seem pricey at 60 times forward earnings estimates, but its entrenched position in the cybersecurity market and its expanding ecosystem of cloud-based services justify that premium.

2. Pinterest

Pinterest carved out a defensible niche in the crowded social media market by allowing its users to pin images, videos, and products they found across the internet to its virtual pinboards.

This unique approach initially attracted a lot of female users, who used their boards to share their interests, hobbies, and fashion ideas with other users. Those boards were also a natural fit for retailers, many of which uploaded their entire catalogs to Pinterest via shoppable pins.

Pinterest's iPad app.

Image source: Pinterest.

Pinterest was also well-insulated from the political controversies that engulfed Facebook and Twitter over the past year, since its boards generally weren't used to share personal posts or news stories.

Those strengths are drawing lots of users and brands to Pinterest. Its monthly active users grew 37% year-over-year to 442 million last quarter, with 13% growth in the U.S. and 46% growth overseas. Its total revenue rose 33% year over year to $987 million in the first nine months of 2020, and its net loss narrowed from $1.33 billion to $336 million.

Analysts expect Pinterest's revenue to rise over 40% in both full-year 2020 and 2021, and for its adjusted earnings to turn positive in 2020 before more than doubling in the current year. Its stock might not initially seem cheap at 18 times 2021 revenue forecasts, but it's still trading at a much lower price-to-sales ratio than many other high-growth tech stocks in this frothy market.

3. Apple

Apple just crushed Wall Street's estimates with a fiscal first quarter that included a record $111.4 billion in total revenue, but its stock barely budged as the battle over GameStop largely overshadowed its big earnings beat.

Revenue and earnings rose 6% and 10%, respectively, last year. Robust sales of Macs, iPads, Apple Watches, AirPods, and its software services easily offset the 3% decline in iPhone sales.

But in the first report of the new fiscal year, revenue surged 21% year-over-year as its earnings, supported by expanding margins and $24.8 billion in share buybacks, rose 35%. Even iPhone sales were up 17%, accounting for 59% of its top line, as users flocked to buy the 5G-enabled iPhone 12.

Its Mac and iPad sales grew 21% and 41%, respectively, as its wearables, home, and accessories revenue jumped 30%. Its closely watched services revenue also rose 24% as paid subscribers across all its services surpassed 600 million. In other words, Apple is firing on all cylinders.

Wall Street expects Apple's revenue and earnings to rise 21% and 33%, respectively, this year. Those estimates indicate this stock remains reasonably valued at 30 times forward earnings, even after rallying more than 70% over the past 12 months. Its dividend yield of 0.6% might seem low, but a payout ratio of 22% means there's still plenty of room for future dividend hikes.