In the competition to be top website, Facebook may cede its runner-up position to YouTube in the next two to three months, according to a new study shared with CNBC by market research firm SimilarWeb.

The five websites receiving the most traffic in the U.S. in the last several years have been Google, Facebook, YouTube, Yahoo and Amazon, in that order. However, Facebook has seen a severe decline in monthly page visits, from 8.5 billion to 4.7 billion in the last two years, according to the study. Although Facebook's app traffic has grown, it is not enough to make up for that loss, the study said.

Facebook took a market tumble last month when it reported that the number of daily active users remained flat in North America in the second quarter, and declined in Europe.

However, Facebook's has other properties to depend on, such as WhatsApp and Instagram. "Yes, Facebook.com the website is down, but they think of themselves more as a portfolio of products," said Stephen Kraus, chief of insights at SimilarWeb and author of the study.

YouTube, which is owned by Google parent Alphabet, has seen increased traffic, the study said. The app has also experienced in increase in viewership.

Yahoo is also poised to lose its position in the ranking. Amazon has already surpassed Yahoo during big spending months, including December 2017 and July 2018, when the e-commerce giant held its annual Prime Day.

The study projects that Amazon will take over Yahoo's ranking in the next two to three months.

However, none of the bottom four of the top five comes close to Google. Although it has seen some decline in website traffic thanks to app use and voice search, it saw approximately 15 billion visits in July 2018, the study said. The others were all below 5 billion, according to the report.