Investing in dividend stocks is a classic strategy for generating reliable passive income and mitigating the risk you take keeping your money in the equity markets.

This balance of passive income, growth, and stability makes dividend stocks a core holding for many investors, and many of these stocks or ETFs have the potential to be lifelong plays.

I'll discuss two here. The first is Realty Income (O -0.17%), one of the most widely held publicly traded real estate investment trusts (REITs). The other is an exchange-traded fund, but not just any ETF. The SPDR S&P 500 ETF Trust (SPY 0.95%) is the largest and oldest ETF out there.

This chart shows how much Realty Income and SPY have grown in total return and their dividends since Realty Income went public in 1994, a year after the inception of the SPDR S&P 500 ETF.

O Total Return Level Chart

O Total Return Level data by YCharts

A titan from one Taco Bell

Realty Income was founded in 1969 when a couple bought a Taco Bell property directly from that franchise's founder in Northridge, California. Since then, the REIT has built a record of 640 monthly dividends and 31 consecutive years of annual increases, solidifying its brand as the self-described "Monthly Dividend Company."

With more than 13,000 properties -- mostly in the U.S. with a growing presence in Western Europe -- leased to more than 1,300 clients in 85 separate industries, Realty Income is the largest retail REIT and a kind of index-type proxy for an investment in the retail real estate business, with a splash of high-dollar casinos thrown in.

The 800-pound gorilla you can easily buy

With a net worth of about $41 billion, Realty Income is big. But the SPDR S&P 500 ETF is mammoth. Launched in January 1993 and now with assets under management of about $459 billion, SPY is an easy way to invest in an index that has returned an average of about 10% each year for the past three decades.

This pioneering ETF is managed by State Street Global Advisors and tracks the S&P 500 index, making it an easy way to make some money over time without tracking an individual company.

If you were to choose just one stock to buy and that's it -- not that that's advisable, of course -- you could do far worse than to buy SPY. Big index funds like this have long proved to be a solid foundation from which to build a diverse portfolio in the equity markets.

No time like today to buy for tomorrow

Past performance doesn't guarantee future gains, of course. But the S&P 500 has typically risen strongly after the Fed stops raising rates, so history points to now as the good time to consider jumping into a top-notch index fund -- even after the recent rally that has seen SPY's total return soar by 10% in the past three months. SPY shares currently sell for about $474 and are yielding about 1.4%.

Realty Income has also rallied nicely, with a total return increase of about 12% in the past three months. Its common stock is trading for about $57 and is yielding 5.4%, a nice level and within its normal range over the years, pointing to its consistency.

Analysts give it a target consensus price of $61.45, which would drive the yield down a bit, but like SPY, this is a long-term buy that can be expected to provide steady income for as long as you care to own it, including for life.