Is real estate really the best investment?

Last decade's housing bubble is becoming a distant memory. Mortgage rates are near historic lows, interest-only loans are back and everyone loves real estate as an investment again.

More than 1 in 4 Americans (27 percent) said real estate was the best investment for money they would not need for at least a decade, according to a new Bankrate.com survey of 1,000 investors. Cash came in second with 23 percent of investors, only 17 percent said the stock market is their preferred place for long-term money and just 5 percent said they would put their long-term money in bonds.

It is the first time real estate has taken the top spot in the three years Bankrate has been conducting the survey. Cash was investors' favorite in 2013 and 2014. "It begs the questions if more Americans are once again viewing real estate as a golden ticket," said Greg McBride, chief financial analyst for Bankrate.

Read MoreIs it time to rebalance your retirement portfolio?

Credit is harder to come by than a decade ago and lenders face more regulations, but financial advisors say many clients are catching the real estate bug again.

"Just last week, a high-tech corporate boomer client with no experience in renovating and selling real estate told us he wanted to go into flipping a property with his friend, who does this for a living," said Jon Ulin, certified financial planner and managing principal of Ulin & Co. Wealth Management in Boca Raton, Florida. His client wanted to liquidate 25 percent of his IRA to invest in the project and told Ulin it would "diversify" his portfolio.

"I advised him that putting a quarter or more of his life savings into flipping and renovating one property with the hopes of making a possible 14 percent profit is not a good idea and a gamble," Ulin said.

Read MoreThis key retirement savings fix is falling short

Real estate has curb appeal that other financial assets can't match.

"For many investors, the tangible nature of real estate simply offers much more peace of mind than the intangible nature of stock and bonds," said Stephen Doucette, a certified financial planner and vice president of Proctor Financial in Sherborn, Massachusetts. "Real estate pricing also adds peace of mind to investors as pricing seems more stable because it is not updated daily by the media."

Investors should weigh the long-term return potential of real estate investing compared with other assets.

The S&P/Case-Shiller 20-City Composite Home Price Index, which measures the value of residential real estate in 20 major metropolitan areas, has generated a hearty annualized 9.2 percent return over the past three years through June 30, but produced an annualized 0.4 percent loss over the past decade. Meanwhile, the S&P 500 index, a broad measure of the U.S. stock market, grew an annualized 14.8 percent over the past three years and 5.87 percent over the past 10 years.

But investors with good credit can borrow to buy real estate, which can enhance returns—or magnify losses, depending on the market. "The singular and best reason to own real estate as an investment is to use leverage," said Stephen Lovell, a certified financial planner in Walnut Creek, California. "Without it, your return on investment tends to be about 2 percent to 3 percent."

Read MoreInsurers to millennials: We've got your back

Real estate also comes with different risks than other financial assets. You cannot sell it as quickly as stocks and bonds. You have to pay for insurance, maintenance and property taxes that can eat into your profits.

"You can't sell real estate short so you cannot hedge against a down market and the market for real estate is too local," warns Wes Shannon, a certified financial planner with SJK Financial Planning in Hurst, Texas. "You may live in a state or city going through an economic boom, but if the other houses on your street start to decline or convert to rentals you can see a depreciation of your [home] value ... even one bad neighbor can ruin an investment in real estate."