Investment guru Peter Lynch once advised ordinary folks to "invest in what you know."

For many small investors, some of the companies they are most familiar with are the e-commerce and social media sites they use every day.

Now some of these private Internet companies, such as Facebook, are expected to go public this year or next and will likely attract a rush of fans to their stocks.

But even if you feel like you know these companies well, there is a risk in investing in them. Competitors are constantly sprouting up, and it's difficult to be predict which ones have staying power. Some Internet companies have raked in millions in revenue but have yet to turn a profit.

And there's so much hype about these companies now that you can count on paying a high price once they do start selling shares to the public. That would be fine if the stock keeps going up into the stratosphere. But if the price falls back to earth, it can take a while to recover your initial investment.

Early investors in Pandora Media Inc., an online music service that went public this month, are already underwater. The stock shot up to $26 per share during the first day of trading. Buyers' remorse set in the next day, and the stock has been trading below its initial offering price of $16 ever since. It closed last week at $15.37 per share.

California-based Pandora has been around for about a decade but has never posted a profit. The fact that Pandora attracted investors anyway has added to the debate on whether we're experiencing something similar to the dot-com bubble.

"It feels like we are partying like it's 1999 again," says James Angel, an associate finance professor at Georgetown University who was on the New York Stock Exchange floor when LinkedIn, a social network for professionals, went public last month.

But Chuck Carlson, chief executive of Horizon Investment Services in Indiana, says the climate now isn't as frenzied as it was before, when investors would throw money at any company whose name ended in "com."

"It's unfair to paint the whole group as a giant Internet bubble," Carlson says. "Like any sector, there will be winners and losers."

Small investors' best bet at gaining a piece of these companies — without huge risk — will be through mutual funds. Funds own shares in dozens or hundreds of companies, so if one fails, the damage to the investor is less severe.

Some mutual fund companies have already sunk money into private shares of social media and e-commerce companies, making those shares part of their fund portfolios.

Fidelity Investment's popular Contrafund, for example, holds a tiny stake in Facebook. Baltimore's T. Rowe Price has funds with small positions in Twitter, Facebook, social gaming company Zynga Inc., and daily deals website Groupon.

As more social media and Internet companies go public, there will be more mutual funds and exchange-traded funds that focus on these stocks.

Still, some investors will want individual stocks. If you're one of them, do your homework before investing. And make sure you are investing money you can afford to lose, and not your retirement savings.

Here are some things experts say you should consider before investing:

Profitability Of course, you want a company to have a history of earnings. Still, it's not unusual for a young Internet company with fast-growing sales to operate in the red for a time. In such cases, you need to determine whether the company has a realistic plan to become profitable.

"Does this story make sense or is it a bunch of hot air?" asks David Straus, senior portfolio manager with Washington–based Johnston Lemon Asset Management.

Amazon, for example, operated at a loss in its early years, as it put the money from sales back into the business, such as building distribution centers, says Richard Cripps, chief investment officer with EquityCompass Strategies in Baltimore. The upfront costs were steep, but investors knew they would eventually subside, he says.