The S&P 500 is near its all-time high, but not all stocks are doing so well. That's especially the case in the real estate sector, where some of the highest-quality real estate investment trusts, or REITs, are trading for 20% or more below their all-time highs.

With that in mind, here are three excellent REITs, all of which are S&P 500 components, that are worth a closer look while they're on sale.

Built for steady income no matter what

Realty Income (O 0.74%) is one of the largest and most popular REITs in the market, with a massive portfolio of properties and reliable monthly dividend income. In fact, Realty Income has a trademark on the phrase "The Monthly Dividend Company." And now, this top-notch stock is down by 35% from its peak.

Realty Income has over 15,400 properties in the U.S. and Europe, and about 80% of the portfolio is retail in nature. But the company acquires properties occupied by tenants that are in recession-resistant and e-commerce-resistant forms of retail. Think dollar stores, drug stores, warehouse clubs, and other properties that tend to hold up well in tough economies. Tenants sign long-term (10-plus-year) leases with annual rent increases built in. All Realty Income has to do is get a quality tenant in place and enjoy year after year of reliably growing income.

To be clear, the decline in Realty Income is mainly due to the current interest rate climate, as opposed to anything wrong with Realty Income's business. The company's income stream continues to grow predictably, and the dividend has now been raised for 107 consecutive quarters with a 5.9% current yield.

The world's largest REIT is on sale

Prologis (PLD 0.86%) isn't just the largest industrial REIT in the market, it is the largest real estate investment trust of any kind. And now you can buy shares for more than 35% below its 2022 all-time high.

The company owns logistics real estate, such as distribution centers and warehouses. If you've ever seen one of those massive Amazon (NASDAQ: AMZN) distribution centers, there's a decent chance it's a Prologis-owned property. In all, Prologis owns 1.2 billion square feet of rentable space on four continents.

Prologis has fallen recently, and one big reason is oversupply fears in the industrial space, but this should be a temporary headwind if anything. While industrial demand is strong, new inventory is expected to drop considerably in 2024 and 2025, and this should help balance the market.

In the meantime, Prologis has been a massive beneficiary of embedded rent growth. In a nutshell, industrial property rental rates soared during the pandemic, but because tenants are on long-term leases, the company only benefits as its leases renew. We're still seeing the effects of this -- in the most recent quarter, Prologis' leasing spread on both new and renewal leases was a staggering 69.5% (so, if a tenant was paying $10,000 per month, he or she would be paying $16,950 on average after renewing). This is likely to be a long-tailed trend, and Prologis' income growth could be surprisingly strong for the next several years.

An industry leader with tons of potential

Vici Properties (VICI 0.74%) is by far the youngest REIT of the three, and it has held up better than the other two in the rising-rate environment, with its stock down by just 21% from the highs.

If you aren't familiar, think of Vici as the leading owner of gaming real estate. It owns the real estate of some of the most valuable Las Vegas Strip properties, including The Venetian, Caesars Palace, MGM Grand, Mandalay Bay, and more. It also owns many regional properties, including top-tier properties like The Borgata in Atlantic City and MGM National Harbor in DC.

Not only is Vici likely to benefit from the tailwinds provided by the legalized gaming trend in the United States, which should create acquisition opportunities over the coming years, but the company is just starting to branch out into non-gaming real estate. It recently acquired a portfolio of Bowlero entertainment centers, and aims to continue to look for compelling opportunities in the massive experiential real estate market. With a 5.9% dividend yield that is well supported by its funds from operations, Vici could provide a nice combination of growth and income for years to come.

A great entry point for long-term investors

To be perfectly clear, I'm not saying that these stocks are going to rebound to their all-time highs quickly. I have absolutely no idea what they'll do over the next few weeks or months, and if the interest rate environment stays elevated, I'd expect them to underperform in the short term. However, these are three reliable income generators with top-notch leadership, and if you measure your investment returns in decades, buying top-quality S&P 500 components like these when they are 20% or more off the highs is an excellent long-term investment strategy.