The rise of e-commerce is like a freight train screaming down the tracks. What was a $1.3 trillion global retail marketplace in 2014 has grown to $4.9 trillion in 2021 and is expected to rise to $7.4 trillion by 2025.

Digital sales extend beyond the traditional online retailers that first come to mind, such as Amazon (AMZN 0.01%). But online sales also benefit logistics companies, cybersecurity providers, and even the landlords that own the distribution centers. 

With the stock market in so much flux in 2022, many investors are seeking shelter. But those with a long-term outlook may want to consider buying or adding to e-commerce stocks that pay solid dividends, create excellent cash flows, and are in sectors that should hold up in an economic slowdown.

With this in mind, let's look at a few companies that fit the bill.


Target (TGT -0.86%) has long-term, defensive qualities even if it is classified as a consumer discretionary stock. That's because it is a lower-cost option for home goods or clothing than a retailer like Macy's (M -0.95%), for instance, so it could see an increase in sales when people feel economic insecurity. In this way, it acts more like a consumer staple company.

The pandemic forced Target to focus like a laser on its digital sales -- and it has paid off in spades. Online sales accounted for 19% of total revenue in fiscal 2021. In fiscal 2020, Target grew digital sales 145% out of sheer necessity. The excellent news is that even as stores reopened, digital sales continued to grow in 2021, rising another 21%. 

Target has an advantage over some other online retailers. It leverages its existing stores to fulfill 95% of its online orders. This allows the company to create and grow this new revenue stream without investing in costly distribution centers and additional warehouses. 

Person with credit card in front of laptop.

Image source: Getty Images.

They say there are two things we can count on -- death and taxes. But perhaps we should add Target's dividend to that list. The company has paid 219 consecutive dividends since going public in 1967. This should give investors some peace of mind during the current market turmoil. Even if the stock dips, investors will likely continue to take home a dividend check. The shareholder can also reinvest the dividend to take advantage of dips in price.


Online retailers need vast logistical networks to get products to consumers quickly and profitably. As online sales grow, more and more space is required. Online sales as a percentage of retail sales are expected to rise from 13% in 2021 to 30% in 2030. Investors concerned about Amazon's recent profitability issues may want to consider its landlord instead -- Prologis (PLD -0.71%)

Prologis is a real estate investment trust (REIT). REITs enjoy certain tax advantages provided they return 90% of taxable income to shareholders as dividends. Prologis has tremendous exposure to e-commerce. Its largest customer is Amazon, and delivery giants FedEx (FDX -0.95%) and UPS (UPS -0.83%) are in the top ten. Taking a look at Amazon's sales growth, shown below, illustrates just how massive the logistical needs of e-commerce are.

Chart showing Amazon's revenue rising since 2017.

Data source: Amazon. Chart by author.

Prologis offers more than a billion square feet of space across 19 countries. The dividend currently yields over 2.5% and has grown at a compound annual growth rate (CAGR) of 12% over the last five years -- three times higher than the average REIT. For those looking for a safe way to invest in e-commerce, Prologis deserves consideration. 

Palo Alto Networks

The rapid rise of e-commerce and cloud-based assets means that digital retailers can ill afford any website downtime. They need to protect endpoints so critical workers can log in securely. Online retailers may also store customer information, such as saved payment methods and addresses, and breaches are devastating. Aside from the high restoration costs, breaches can affect customers' trust in the brand.

Palo Alto Networks (PANW 9.00%) is a trusted global leader in cloud security and endpoint protection. More than 85,000 customers trust their security to Palo Alto. Sales for fiscal 2022 are expected to reach $6.8 billion, which is about a 25% increase over fiscal 2021. The tech sell-off has created an opportunity to pick up Palo Alto stock well off its 52-week high, as shown below. 

Chart showing rise in Palo Alto's price and recent sharp fall in its revenue.

PANW data by YCharts

Palo Alto stock may outperform the market over the long term due to its growing revenue, innovative technology, and the world's increasing cybersecurity needs.