Dividends are an important component of a fully thought out investment strategy during the best of times, but a critical one when things turn south and markets crash. They can be the lifeline that pulls you through the worst of times.

Wal-Mart (NYSE:WMT), Rollins (NYSE:ROL), and Dollar General (NYSE:DG) were three names our Motley Fool investors have identified as dividend stocks that will thrive during a market crash. Read on to find out why.

Woman picking produce at a supermarket

Image source: Getty Images.

Even when the market's dropping, people keep shopping  

Keith Speights (Wal-Mart): Even during market crashes, people still must buy necessities for living. That's why some of the consumer-goods stocks tend to perform better than most stocks during major market meltdowns. It's also why Wal-Mart is a good pick during market crashes.

Back during 2008, most stocks plummeted as what came to be known as the Great Recession took its toll. Not Wal-Mart. The big retailer's shares increased close to 20% that year. In addition, Wal-Mart paid out a dividend that yielded more than 1.5% for most of the period. 

Fast-forward to today, and Wal-Mart's dividend yield is over 2.5% is even more attractive. The company's payout ratio stands below 49%, and its cash flow is solid, so even if earnings took a hit, Wal-Mart should be able to keep the dividends flowing.

But what about the greater threat from e-commerce that brick-and-mortar retailers face today? Wal-Mart is in better shape than you might think. Wal-Mart has acquired several online retailers in the past couple of years to beef up its e-commerce capabilities. In the second quarter of 2017, the company's e-commerce revenue soared 60% year over year. 

Although we're now nearly a decade past the last major market crash, the fundamental reasons Wal-Mart stock performed better than most remain in effect. The company still offers products that consumers need for generally low prices. There's no way to know when the next market crisis will occur, but Wal-Mart seems to still be well positioned to survive and thrive regardless of what happens in the stock market.

Cockroach in a sink

Image source: Getty Images.

Bugs don't care about the economic climate

Brian Stoffel (Rollins): I'm not one to invest in a way that anticipates market crashes. But if I were, I would focus on companies that provide a service necessary regardless of the broader economic climate. That's why I think Rollins -- parent company of Orkin, Western Pest Services, and smaller exterminators -- is an ideal pick.

For proof, look no further than the stock's performance during the Great Recession.

ROL Chart

ROL data by YCharts

Sure, no one likes seeing shares lose a fifth of their value. But when juxtaposed against a broader market that loses almost thrice as much, an argument could be made that it was actually thriving. Throw in the fact that the company has offered a dividend throughout, and shareholders who held through the craziness have enjoyed a whopping 550% return over the past decade.

The company has increased both earnings and revenue for 45 consecutive quarters. And while the current dividend yield of just 1.1% might look puny, there are two factors to consider: It has increased its payout by 15% annually over the past five years, and it uses less than half of its free cash flow to make that payment -- which means there's tons of room for growth.

Shopping cart filled with coins.

Image source: Getty Images.

Don't discount the dollar stores

Rich Duprey (Dollar General): I'm going to go Keith one better and look to the deep-discount end of the market for a dividend player that will reward investors when the stock market crashes. Dollar General, despite its name, is more than just a dollar store, as more than 80% of its SKUs are at the $5 level or lower. That puts it more on par with Five Below than with Dollar Tree , where everything really is $1 -- though its Family Dollar chain also offers higher price points.

What makes the deep discounters special is they help consumers stretch their wallets considerably further than other chains. And as the dollar stores have added refrigerators and freezers, the greater breadth of choice available to consumers makes them invaluable. They also appeal to a broad section of consumer income levels.

What sets Dollar General apart is its move into fresh produce and meat. When Wal-Mart abandoned its small-footprint Express concept stores that were intended to compete with the dollar stores, Dollar General swooped in and bought 41 of the 102 locations. It was already offering its customers fresh produce at its DG Markets stores, and now it's able to really expand the offerings.

Admittedly, Dollar General's $1.04 dividend is modest, and it's yielding just 1.3% at current prices. But with a payout ratio of less than 12%, it has plenty of room to grow the dividend in the future. That, coupled with the ability to operate in good markets and bad, and to shine in the latter, means Dollar General's investors should thrive alongside the stock for years to come.

Rich Duprey has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Rollins. The Motley Fool recommends Five Below. The Motley Fool has a disclosure policy.