Are we headed for a recession? Some financial experts are convinced of it. Others, not so much.

Either way, we're in the midst of tricky economic times. On the one hand, job growth has been strong and steady. On the other, inflation is soaring, and the stock market has seen its fair share of turbulence over the past four or five months.

But regardless of when our next recession will hit, it's important to set up your portfolio to withstand a period of economic distress. And buying the right REITs, or real estate investment trusts, could put you in a solid position to get through a recession and come out just fine on the other side. Here are three REIT sectors to consider.

A smiling person at a laptop.

Image source: Getty Images.

1. Healthcare REITs

Healthcare REITs are companies that operate different types of medical facilities, from hospitals to skilled nursing centers to urgent cares. What makes healthcare REITs such a good buy is that they're apt to hold up well during economic downturns.

The reason? Healthcare is an ongoing, essential need. Even if economic conditions sour and consumers are forced to cut back on spending, they're apt to skip the movies or a trip to the mall before they force themselves to tough out a wicked sore throat to save money on seeing the doctor. And when medical emergencies strike, people have no choice but to seek out and spend money on healthcare -- like it or not.

2. Self-storage REITs

The pandemic has changed a lot of people's living situations. Now, workers are trying out new cities -- an option made available thanks to remote employment arrangements -- and are experimenting with different housing setups.

That's already led to an uptick in self-storage demand. But even during trying economic times, self-storage companies are likely to do just fine.

Why? For one thing, self-storage is fairly inexpensive. And so consumers are more likely to cut back on another expense rather than stop paying for self-storage and be forced to get rid of their belongings.

Also, when economic conditions take a turn for the worse, many people need to downsize their homes, leaving them with an excess amount of belongings to store. As such, it's easy to argue that self-storage facilities are actually poised to thrive during a recession.

3. Residential REITs

Residential REITs operate apartment buildings and complexes. And that's a good business to be in right now.

These days, home prices are skyrocketing, and mortgage rates are following suit. That's making it even more difficult than usual for people to purchase homes. As such, there's been an increase in demand for rentals, and residential REITs are capitalizing on it.

But residential REITs are also likely to perform well during a recession. Even when the economy is in a bad state, people will always need a roof over their heads. That alone makes these REITs a solid bet.

It's all about choosing the right investments

Ideally, your portfolio should consist of a mix of investments, and some of those should be specifically designed to withstand a recession. It pays to look at putting some money into healthcare REITs, self-storage REITs, and residential REITs -- especially if you believe that an economic downturn is imminent.