Moment Editorial/Getty Images

Amazon may be the king of e-commerce, but that doesn't mean everything it does is successful.

The company confirmed Wednesday it plans to shut down its Quidsi business, after Amazon struggled to make it profitable over the past seven years. Bloomberg first reported the change. Amazon bought Quidsi in 2011 for $545 million. The business runs six specialty retail sites: Diapers.com, Wag.com, Soap.com, BeatyBar.com, Yoyo.com and Casa.com.

"We have worked extremely hard for the past seven years to get Quidsi to be profitable, and unfortunately we have not been able to do so," an Amazon spokesperson said in an emailed statement.

The change to Quidsi may point to Amazon's interest in cutting down on unprofitable businesses, after it's spent the past 20 years placing many bets on many different kinds of businesses in hopes of finding its next big profit center.

The spokesperson said Quidsi's team will continue to operate as a marketplace seller on Amazon.com and its software development team will focus on building technology for AmazonFresh, the company's groceries business.

Sites including Diapers.com will be shut down, though the spokesperson didn't offer additional details on whether Quidsi's sites will send web traffic to Amazon.com or be sold to another company. No specific timeline for the change was mentioned.

Long-time friends Marc Lore and Vinit Bharara founded Quidsi in 2005. Amazon eventually acquired the business after starting a price war with the startup competitor.

Both founders left Amazon in 2013. Lore went on to create another e-commerce startup, Jet.com, which brought in hundreds of millions of dollars in funding and was seen as a new potential competitor to Amazon.

Jet.com launched in 2015 and Walmart snapped up the company for $3.3 billion last year and installed Lore as its new US e-commerce head.