A recession could come this year as the Fed continues its efforts to slow down the economy and get inflation under control. But even in a downturn, there are some stocks that are still worth buying and holding right now.

A couple of robust businesses that I expect to outperform many of the stocks that comprise the S&P 500 and to be great long-term buys regardless of what happens with the broader economy this year are McDonald's (MCD -0.03%) and UnitedHealth Group (UNH -1.17%). Let's find out a bit more about these two dividend stocks and what makes them recession resistant.

1. McDonald's

A recession could hurt many businesses this year as consumers scale back on spending. But what makes McDonald's appealing is that its relatively low-priced meals (especially its dollar menu) can help people keep their spending down while still being able to eat out. It's a small luxury that consumers could justify, even in tough times, and that's why I see the business as potentially being resilient should a recession take place.

McDonald's is also working on improving its products. Any improvement to the menu could help spike sales, so this is another encouraging reason to be bullish on McDonald's stock.

Although the company hasn't been entirely resilient, announcing hundreds of layoffs earlier this month, demand for its products remains strong even as prices have been rising and chipping away at its customers' discretionary income. In 2022, sales rose by 6% when excluding the impact of foreign currency exchange. And while its net income did decline 13% (excluding foreign exchange), that drop includes a nearly $1.3 billion pretax expense related to the sale of its Russian operations.

The stock's 2.1% yield is better than the S&P 500 average of 1.7%, and with a payout ratio of around 68%, the dividend remains in great shape. The company has also been raising its dividend payments annually for an impressive 46 consecutive years.

2. UnitedHealth Group

Health insurance giant UnitedHealth Group should also continue performing well this year even if the economy doesn't. The need for health insurance isn't going to dissipate in a tougher economy. If anything, the business could continue growing, especially in the long run as an aging U.S. population leads to more seniors requiring healthcare coverage.

UnitedHealth reported its first-quarter 2023 results earlier this month, and revenue of $91.9 billion for the period ending March 31 was up 15% year over year as the company served more people. Operating earnings of $8.1 billion rose by 16% to $8.1 billion. It also boosted its guidance for the year, and now forecasts adjusted earnings per share between $24.50 and $25, up from a range of $23.25 to $23.75.

UnitedHealth's business is doing well, and there's little reason to think it won't continue doing that in a downturn. While its dividend yield of 1.3% might look unimpressive, there's a big incentive for long-term investors to simply hang on to the stock: The company has generously increased its payouts over the years.

With an incredibly modest payout ratio of just 30%, it wouldn't be surprising to see the company continue to increase its dividend for the foreseeable future.