It's a tough time for a tech debut.

As e-commerce giant Alibaba gets ready for a blockbuster stock sale in the next few months, technology shares are retreating. For two years, investors bid up biotechnology and internet companies, enticed by their strong growth prospects in an otherwise weak U.S. recovery. But they have sold off those stocks since late February, realizing they can find better value elsewhere. So-called growth stocks like Amazon and Groupon are out of favor. Companies that pay healthy dividends and have a long record of profitability, like utilities, are in.

Into this brutal environment comes Alibaba, a company that propelled the rise of online shopping in China and is now preparing an initial public offering that could become the biggest in U.S. history.

It's not an optimal time to pitch tech. Internet companies, whose market values ballooned in 2013 amid high hopes, have pulled back in 2014. Twitter, which held its IPO last November, peaked at $74.73 a month later. But the stock down more than half from that high, including a plunge Tuesday after company insiders were allowed to sell stock for the first time.

Roughly $149 million has been pulled out of science & technology funds the last two months, according to mutual fund data provider Lipper. Over the same period, about $5.2 billion has flowed into value-focused mutual and exchange-traded funds. The lopsided moves show that investors are skittish about tech.

Tech is the highest-profile casualty of a fundamental shift in investor behavior, market watchers say. Instead of putting money in growth stocks - companies whose earnings rise at above-average rates - fund managers now want shares of safer companies. Instead of hunting for stocks whose prices could double this year, investors want so-called value stocks, companies that are undervalued by the market but pay relatively high dividends, sell necessities and have mature business models.

"They're killing everything high-growth," says Ian Winer ofWedbush Securities. "It's the same story, no matter what company you look at: investors want out."

What they want are utilities, energy and health care. As a result, the three are the best performing industries in the S&P 500 this year - up by 13 percent, 6 percent, and 5 percent, respectively. By comparison, the S&P is up 2 percent.

The recent skepticism about tech companies is a reversal of the last two years.

Money poured into high-growth tech companies starting in 2011 because they were the only parts of the economy that seemed to be expanding, market strategists say.

"Many flocked to a few areas - including social media, cloud computing and biotechnology - of the market where high growth seems well assured," says Ed Cowart, portfolio co-manager at Eagle Asset Management. "(But) concentrated and aggressive interest drove those stocks to dizzying heights."

Besides high prices, another trend has drawn investors' away from Internet stocks. Nontechnology companies are starting to see modest increases in sales and profits. Evidence is also emerging that overall U.S. growth is picking up after a tough winter.

"If the economy is getting better, big traditional large-cap stocks are going to look pretty cheap," says Bob Doll, chief equity strategist at Nuveen Asset Management.

Greenlight Capital's David Einhorn, the hedge fund manager who correctly called the collapse of Lehman Brothers, says technology stocks are in a bubble that is an "echo of the previous tech bubble" in 2000.

He thinks that these "bubble stocks" will fall further, although he did not disclose which companies they are.