After years as one of the market's hottest trades, the e-commerce sector cooled down in 2022. The Global X E-commerce ETF, which holds many of the stocks in the sector, fell about 40% last year, and many former highfliers in the space fell even more. Investors gave e-commerce companies a lot of credit for the growth they exhibited during the pandemic, but as the economy reopened, they were no longer willing to extend this same credit. 

But over the long term, the shift to e-commerce is still a powerful one. According to data from Infiniti Research, e-commerce is still expected to grow at a 27% compound annual growth rate (CAGR) through 2027 globally. Let's take a look at three top e-commerce stocks that investors can buy and hold for the next decade. All three are slightly off the beaten path, profitable, and trading at reasonable valuations.

A person smiles while holding a smartphone and a credit card.

Image source: Getty Images.

1. Williams-Sonoma 

I know what you might be thinking: Williams-Sonoma (WSM 0.15%) -- the parent company of home goods and furniture brands Pottery Barn, West Elm, and Williams-Sonoma -- doesn't seem like a traditional e-commerce company. But the omnichannel furniture retailer is also an underrated e-commerce stock with a booming online business. In fact, 66% of Williams-Sonoma's sales come from e-commerce, and it has grown e-commerce sales at an impressive 9.7% CAGR over the past 20 years.

Right now, e-commerce is underpenetrated in home goods and furniture, with only 30% of sales taking place online, according to data from Euromonitor. With Williams-Sonoma's large online presence and extensive scale, it should benefit as e-commerce penetration in the sector grows. 

You may think of e-commerce stocks as unprofitable companies trading at foreboding valuations, and in some cases, you would be right. But here's what makes Williams-Sonoma an even better e-commerce stock -- not only is it profitable, but it also trades at an attractive valuation of just 7 times earnings.

Furthermore, Williams-Sonoma pays a dividend, and shares currently yield 2.7%. Between dividends and share repurchases, Williams-Sonoma has returned $2.5 billion to shareholders over the past five years.

Williams-Sonoma's strong digital presence, profitability, attractive valuation, and returns to shareholders make it a top e-commerce stock for the next decade, even if it's not the first stock that comes to mind when you think of e-commerce.  

2. PetMed Express 

Like Williams-Sonoma, PetMed Express (PETS -0.48%) is another under-the-radar e-commerce name. Like its e-commerce peers, the online pet pharmacy's stock struggled in 2022, down 37% from its 52-week high. 

PetMed Express stands out among its e-commerce peers as a profitable company that pays a dividend. This isn't just a token dividend -- shares of PetMed Express yield about 6.5%, which is well above the market average. At 19 times forward earnings, valuation seems reasonable. 

The company has been working its way through some challenges in recent years (last quarter, revenue fell 3% year over year while earnings per share fell 28%), but there is a new management team in place with a new vision for the business. Under this new leadership, the company is seeking to move beyond the pet medication market and expand into the larger $123 billion total pet market as a one-stop-shop for pet health and wellness.

As PetMed Express works on this turnaround, demographics seem to be in its favor. The total number of pets in the United States exploded during the COVID-19 pandemic, as 23 million Americans adopted pets, according to the American Society for the Prevention of Cruelty to Animals.

In an earnings call on Nov. 7, 2022, PetMed Express CEO Matthew Hulett estimated 70% of U.S. households now own a pet. "Around 40% of pet parents spent more on wellness products in 2021 than in 2020, and we see this trend continuing," he said. 

This growing pet population and the changing way that many people view their pets as a member of the family should serve as long-term growth drivers for PetMed Express. With a reasonable valuation and an attractive dividend yield, PetMed Express looks like a buy for risk-tolerant investors. 

3. Revolve Group 

Like Williams-Sonoma and PetMed Express, Revolve Group (RVLV 1.07%) is a profitable e-commerce company that saw its share price decline markedly in 2022. Shares of the online fashion retailer are down 65% from their 52-week high, but there is a lot to like here.

On the surface, Revolve Group may look like any other fashion retailer, but it differentiates itself in two ways. The company's customer base is primarily comprised of millennial and Gen Z women, and it extensively leverages online influencers to stay relevant with this audience.

Second, Revolve Group takes a data-driven approach to its business. On its investor relations website, it claims its "proprietary technology leverages data from a vast net of styles, attributes, and customer interactions to create a strategic asset of hundreds of millions of data points."

This approach appears to be paying off as it has enabled Revolve Group to keep inventory fresh and avoid the need to be promotional with pricing, with an average of 1,300 new styles launched per week in 2021 and 87% of sales made at full price.

The stock is down significantly because investors suspect that discretionary spending will remain challenged based on inflation and the potential of a looming recession, but the company's sales are holding up. While net income fell 28% during the most recent quarter (partially attributable to a higher tax rate), net income is still 25% above where it was before the pandemic in 2019, indicating that the company is in overall stronger shape.

Furthermore, revenue continued to grow, with a 10% year-over-year increase in sales, good for a 20% compound annual growth rate (CAGR) since the third quarter of 2019.

With a reasonable valuation, a tech-savvy approach, and a strong growth track record, Revolve Group looks like a good bet to return to its winning ways. 

E-commerce stocks were down in 2022, but this created a favorable entry point into this growing sector for investors in 2023. These three stocks all look like the types of e-commerce stocks that investors can feel good about buying and holding for the decade ahead, based on their profitability, reasonable valuations, and long-term growth prospects.