Despite the record highs in the S&P 500 and Dow Jones Industrial Average, there are still some excellent companies that trade for steep discounts. That's especially true when it comes to dividend-paying stocks in the real estate sector, which tends to be highly sensitive to rising interest rates.

It's important for investors to understand that in many cases, stocks can trade for a significant discount even though their underlying businesses are doing just fine. With that in mind, here are two excellent real estate investment trusts (REITs), both of which have excellent businesses, pay above-average dividends, and are trading at attractive prices right now.

The largest REIT in the world is on sale

Industrial real estate investment trust heavyweight Prologis (PLD 0.69%) reported strong results for the fourth quarter, and the market for industrial properties (like distribution centers) is still red-hot.

One key point to know about Prologis is that its current earnings don't reflect the true state of the business -- yet. We're still seeing the effects of the pandemic surge in industrial demand working its way into the numbers.

If you aren't familiar, industrial rents spiked higher during the pandemic years, but since most industrial leases are 5+ years in length, it takes time before all of Prologis' leases are adjusted to account for the higher market rent. In Q4, Prologis reported a staggering 51.8% cash-rent change on new and renewal leases, as well as a tenant-retention rate of more than 73% and occupancy above 97% (so higher lease rates aren't chasing tenants away).

The company isn't slowing down. It acquired $495 million in properties during Q4 and started more than $2 billion in development projects. The latter is typically the best use of capital, and with expected average yields of 6.9% on developments versus 5.6% on acquisitions, it's no surprise that Prologis is investing heavily to bring new inventory to market.

With shares trading for more than 25% below their 2022 highs despite tremendous execution in the business, Prologis could be an excellent REIT to add to your portfolio for years to come.

An all-time high doesn't necessarily mean a stock is expensive

Hospitality-focused REIT Ryman Hospitality Properties (RHP 0.09%) is a perfect example of a stock trading close to its all-time high but that could still be a bargain for patient investors.

If you aren't familiar, Ryman operates a portfolio of large-scale hotels focused on group events like conferences and conventions. Five of the six properties are Gaylord hotels. It also owns a portfolio of entertainment venues and assets, including the namesake Ryman Auditorium, Austin City Limits, and the growing Ole Red entertainment chain.

The management team has an excellent history of delivering growth and excellent returns for investors. In its preliminary 2023 Q4 results, Ryman's average daily room rate (ADR) grew by 8.5% year over year, and net room nights booked grew by an impressive 30%, showing how strongly group travel has rebounded from the pandemic disruption.

Ryman has some exciting future catalysts investors should know. It plans to invest over $1 billion over the next four years in value-adding projects at its hotels to capitalize on the strong group-travel market, and it just opened its flagship Ole Red location. It is partnering with country star Luke Combs to develop a massive entertainment complex in Nashville.

Despite shares trading for an all-time high, the company is only valued at about 14 times funds from operations (FFO) -- the REIT version of "earnings." With lots of potential to add value and excellent liquidity, Ryman could outperform for years to come.

Buy for the long term

To be sure, I think the share prices of these two REITs are attractive right now, but that doesn't mean I think they're going to go up over the next few weeks or months. REITs like these are designed to produce excellent total returns over the long run, and if you add them to your portfolio, be sure you're willing to wait for at least a few years for the investment thesis to play out.