A major rally in Google pushed the Nasdaq to a second straight record high on Friday while weak energy stocks weighed on the Dow and S&P 500.
Google (GOOGL.O) surged 16.26 percent to end at an all-time high of $699.62, a day after reporting strong ad revenue growth. It was Google's largest one-day percentage gain since April 2008.
Facebook (FB.O) rose 4.53 percent to a record high of $94.97 on hopes that it could mirror Google's ad growth. Etsy (ETSY.O) spiked 30 percent thanks to a nod from Google during its conference call.
But a drop in oil prices limited gains on the broader stock market, with the S&P 500 energy index .SPNY down 1.07 percent to its lowest level since January 2013. Chevron (CVX.N) lost 1.4 percent. The utilities index .SPLRCU dropped 1.06 percent.
Wall Street insiders were cautiously optimistic about upcoming quarterly reports after some results this week came in above expectations.
"It's going to be better than what the consensus numbers were pointing to," said Kurt Brunner, a portfolio manager at Swarthmore Group in Philadelphia. "Our economy is doing okay. We're not growing at 5 percent but we have slow, steady growth and I think that continues."
The Nasdaq Composite .IXIC added 46.96 points, or 0.91 percent, to end at 5,210.14, its second straight record high close.
The S&P 500 .SPX gained 2.35 points, or 0.11 percent, to end at 2,126.64, just shy of its record high of 2,130.82.
The Dow Jones industrial average .DJI fell 33.8 points, or 0.19 percent, to end at 18,086.45.
Boeing (BA.N) fell 1.11 percent and was the biggest drag on the Dow after it said it will take a second-quarter charge related to problems with its KC-46 aerial refueling tanker aircraft program.
General Electric (GE.N) shares rose 0.74 percent after raising its 2015 outlook for its industrial manufacturing businesses.
The technology index .SPLRCT was the sole gainer among the 10 major S&P 500 indexes, up 1.75 percent, mostly because of Google.
For the week, the Dow gained 1.8 percent, the S&P added 2.4 percent and the Nasdaq rose 4.3 percent, its largest weekly gain since October 2014.
The dollar saw its biggest weekly gain in two months due to expectations of a Federal Reserve rate hike this year. However, a strong dollar reduces the value of U.S. companies' overseas income.
U.S. companies have been expected to post their worst sales decline in nearly six years in the second quarter, in part due to the strong dollar. Profit is expected to have fallen 2.9 percent, according to Thomson Reuters estimates.
Declining issues outnumbered advancing ones on the NYSE by 2,000 to 1,076, for a 1.86-to-1 ratio; on the Nasdaq, 1,676 issues fell and 1,115 advanced for a 1.50-to-1 ratio favoring decliners.
The S&P 500 posted 21 new 52-week highs and 25 new lows; the Nasdaq saw 107 new highs and 87 new lows.
Volume was a bit light, with about 6.1 billion shares traded on U.S. exchanges, below the 6.6 billion average so far this month, according to BATS Global Markets.