Real estate investments have a long history in this country of moving independently of the stock market, which sounds like a pretty good thing right about now.

But investing directly in real estate can be expensive, time-consuming, and complicated, especially compared to the low cost of entry, transparency, and liquidity of simply buying stocks.

Here's a good compromise: Consider buying some of the 225 or so publicly traded real estate investment trusts (REITs). These pools of income-producing properties are required by law to pay out most of their taxable income to shareholders in the form of dividends, providing even more buffer against the vicissitudes of a reeling market.

REITs also come in a variety of flavors, offering the opportunity to pick and choose among sectors that you deem to be the most promising now and going forward. Here are four that, for now, appear positioned to take advantage of some real estate trends that likely aren't going away, at least anytime soon.

Aerial view of a large distribution warehouse with loading docks and many trucks.

Image source: Getty Images.

1. Logistics and Prologis: A future full of warehouses

Prologis (PLD -2.70%) is one of the world's largest owners of warehouses, with about a billion square feet under its roof across the planet. That makes it a member of the industrial REIT group, and it continues to take advantage of the demand for e-commerce logistics space that should have plenty of room to run for years. Plus, Prologis has raised its dividend for nine straight years and is currently yielding about 2.39%.

2. American Tower just keeps rising

American Tower (AMT -0.60%) is considered an infrastructure REIT and, like Prologis, is the largest of its kind. AMT has a global portfolio of about 220,000 telecommunications sites. This REIT has produced five times the total return of the S&P 500 in the past 20 years. Continued growth in mobile communications, along with the company's expansion into data centers, should help it continue a streak of 13 straight years of dividend increases that has it now yielding about 2.42%.

3. Alexandria keeps providing a lift from life sciences

Alexandria Real Estate Equities (ARE -2.18%) has a dozen consecutive years of dividend hikes under its belt -- good for a current yield of about 2.60% -- and there's likely more to come for this pioneer of life sciences lab space, which occupies a prime spot in the otherwise shaky realm of office REITs. The company's client list includes all the major vaccine makers and myriad other technology and biopharma companies occupying prime space in collaborative campuses in several major markets from Boston to San Francisco.

4. Equity Residential keeps moving on up

Equity Residential (EQR -1.67%) is one of the nation's largest multifamily owner-operators, with a portfolio of 311 properties and 80,581 units in Boston, New York, Washington, D.C., Seattle, San Francisco and Southern California, Denver, Atlanta, Dallas/Fort Worth, and Austin. This residential REIT is currently pumping out a yield of about 3.36%, while the demand for apartments and the ability to raise rent quickly through short-term leases promises to keep this profit machine humming through inflationary times.

EQR Total Return Level Chart

EQR Total Return Level data by YCharts.

Solid companies plus essential markets equals promising investments

Real estate lends itself to long-term investing, and real estate stocks like these REITs are no exception. As the chart above shows, each of these REITs has bested the S&P 500 in total return over the past 20 years. They also are each dominant players in their respective niches, and those niches themselves are the beneficiaries of macro trends that may well last for years to come.