Snapchat recently turned down $3 billion from Facebook (META 0.31%), it took $19 billion to buy WhatsApp, AirBnB is reportedly valued at $10 billion, and the maker of Candy Crush recently went public -- and even after dropping from its IPO price it still has a $5.8 billion market cap. If this sounds like the gaga days of the late '90s, it's because another tech bubble is forming right before our eyes.

When companies start using metrics like "daily users" or "messages sent" to display their value instead of figures like revenue and profits, alarm bells go off in my head. The good news is we've been through this tech mania before, and there's a blueprint for how to survive it.

We don't have to look further for guidance than the legendary Warren Buffett, who was considered out of touch when the tech bubble formed in the late '90s and came out with a better reputation after the bubble popped. Here are a few lessons Buffett taught us to avoid Tech Bubble 2.0.

Investors love Facebook today, but teens are leaving in droves and its popularity may have peaked.

Beware of paying big for growth in tech
What's interesting about the recent moves in tech is how older companies are buying high-growth upstarts with little revenue or earnings. Instagram cost Facebook $1 billion and had zero revenue before the acquisition. WhatsApp gives users free access to its product with the promise of charging $1 per year after the first year, for a potential $500 million in revenue to go along with a $19 billion valuation. Yahoo! bought Tumblr for $1.1 billion last year after the company made just $13 million in revenue the year before.

We've seen this story before, and we know it doesn't end well. In the last bubble, Yahoo paid $5.7 billion for Broadcast.com in 1998, making Mark Cuban a billionaire. In social media, there was News Corp.'s acquisition of MySpace for $580 million, only to be sold seven years later to Specific Media and Justin Timberlake for $35 million. Paying big for potential growth without a sustainable competitive advantage is dangerous for investors. 

Why Buffett wins long-term
In 2000, critics were openly wondering if Warren Buffett had lost his investing touch after missing out on the explosive growth in tech and Internet stocks. Forbes said in May 2000 that Buffett seemed to have lost his touch, and people were even questioning his buy-and-hold strategy. Internet IPOs were soaring when they hit the market and tech stocks never seemed to lose, yet Buffett stuck to his old value-investing habits, focusing on companies that spun off profits year after year.

When the Internet bubble finally burst and the market crashed, it was Buffett who had the last laugh. The reason is that at the end of the day, profits matter, and so do the sustainability of those profits.

The bubble currently building in tech valuations isn't the same as the late '90s one, because there are some viable businesses with decent competitive moats, but for every Google there's a Zynga or Groupon. Facebook's or Twitter's (TWTR) moat is really just about popularity, and unless they can continue to stay popular and grow they'll go the way of MySpace, Internet has-beens.

How does Buffett do it?
The first thing Buffett does to avoid getting caught in a bubble is stay out of highly speculative growth stocks. I'll use Facebook, Twitter, and Tesla Motors (TSLA -2.73%) as examples of highly speculative tech stocks that Buffett wouldn't be buying now. 

Here I've provided the price-to-book value, price-to-sales, and price-to-earnings ratios, all commonly used measurements of value for stocks. You can see that by any measure these companies are trading at lofty valuations.

Company

Price/Book Value

Price/Sales

Price/Earnings

Facebook

10.5

20.8

107.7

Twitter

9.3

41.3

n/a

Tesla Motors

40.6

13.5

n/a

Source: Yahoo! Finance.

Now compare those ratios with Buffett's five largest holdings, which trade at much more reasonable valuations and have survived the financial crisis and come out stronger. 

Company

Price/Book Value

Price/Sales

Price/Earnings

Wells Fargo

1.7

3.2

12.6

Coca-Cola

5.1

3.6

20.4

American Express

5.0

3.1

18.7

IBM

8.7

2.0

12.8

Procter & Gamble

3.2

2.5

21.4

Source: Yahoo! Finance.

Notice the competitive moat these companies have, particularly Coca-Cola (KO 0.05%), American Express, and Procter & Gamble (PG 0.74%). Coca-Cola is a global brand that has an incredible amount of shelf space at grocery stores worldwide, something that's taken decades to build. American Express has a huge credit card network that would be nearly impossible to replicate or replace. And Procter & Gamble makes products that are called consumer staples for a reason -- you couldn't get by without them. 

Coca-Cola can leverage relationships with restaurants and grocery stores to maintain market share, making it tough to build competitors.

The point here isn't that Facebook, Tesla, or any other company can't grow into their valuation; it's that multiples like we see in the tech stocks above involve greater risk. If any of these companies goes out of favor with consumers or fails to hit growth numbers, their stocks could drop rapidly. That's what happened in the late '90s, when investors fled tech en mass.

Buffett's stocks, on the other hand, have proven long-term earnings power, great balance sheets, and moats that provide a safety net for investors. Owning stocks like that are how you avoid a bubble. 

Don't be afraid to miss out on the next big thing
Maybe the best lesson we can learn from Warren Buffett is that it isn't bad to miss out on the next hot investment. Buffett is rarely an investor in the year's hottest stock, choosing instead to buy companies that grow profits steadily year after year. In today's frothy market, that low-risk philosophy could save you from owning one of these stocks when they collapse.

Owning Tesla or Twitter during its rise is exciting, but we've seen stocks like this fall flat before. Sometimes safe is better than sorry, especially in a market that's looking a lot like the tech bubble of the late '90s.