It's time to seriously consider investing in dividend growth stocks if you haven't already. There's a real possibility that a recession is on the way -- and guess which stocks tend to outperform during recessions? The answer -- according to investment firm Goldman Sachs -- is the stocks of companies that consistently increase their dividends.

You'll especially want to focus on investing in businesses with sustainable competitive advantages. The good news is that they're not hard to find. Here are three rock-solid dividend growth stocks to buy right now.

1. Microsoft

Many people don't think about Microsoft (MSFT -0.32%) as a dividend stock. However, the tech giant has been making quarterly payouts steadily since 2004. It has also increased its payout every year, and at the current share price, it's yielding nearly 1.2%.

That yield might not seem overly impressive. But investors who bought Microsoft at the end of 2004 would have an effective dividend yield (based on their initial purchase price) of more than 10% today.

Sure, Microsoft's stock price is down significantly this year. Investors are especially worried that the growth of its Azure cloud hosting business will slow. 

However, the company has shown itself in the past to be quite resilient. It's well-diversified across multiple areas in the tech sector. And as CEO Satya Nadella stated in Microsoft's recent quarterly conference call, "In a world facing increasing headwinds, digital technology is the ultimate tailwind." 

2. PepsiCo

PepsiCo (PEP 0.80%) belongs to the exclusive group of S&P 500 members known as Dividend Kings. The food and beverage leader has increased its payouts for 50 consecutive years, and at the current share price, its dividend yields more than 2.5%.

More dividend hikes will almost certainly be on the way. Pepsi's dividend payout ratio is under 64%, giving it plenty of flexibility to boost payouts further. The company also expects that its earnings will increase by 10% in its fiscal 2022. This estimate is higher than the 8% growth that management projected just a few months ago.

Although Pepsi stock is down a little year to date, it's outperforming the S&P 500 by a country mile. The reality is that the company is quietly having a very good year. All of its business units continue to deliver solid sales growth. 

Pepsi probably won't be entirely immune to a recession, if there is one. However, its business and share price are likely to hold up better than most.

3. UnitedHealth Group

UnitedHealth Group (UNH 0.14%) stands out as another exceptional dividend growth stock to buy right now. The big healthcare company began paying annual dividends in 1990. It switched to quarterly dividend payments in June 2010, and has increased its dividend for 13 consecutive years.

Granted, UnitedHealth's yield of only 1.2% probably won't excite many income investors. But it's appropriate to consider the company's impressive dividend growth. If you bought the stock when it began making quarterly payments in 2010 and held onto your shares, your effective dividend yield today would be close to 21%.

Like PepsiCo, UnitedHealth has fared relatively well so far this year despite the significant market headwinds. The company's products, including health insurance, pharmacy benefits management, and healthcare services, tend to enjoy solid demand even when the economy is struggling.

Look for acquisitions to fuel UnitedHealth Group's growth. Its Optum unit recently purchased healthcare data and analytics provider Change Healthcare. And it's awaiting the finalization of its acquisition of home health provider LHC Group