Founded in 1993 by brothers Tom and David Gardner, The Motley Fool helps millions of people attain financial freedom through our website, podcasts, books, newspaper column, radio show, and premium investing services.

Staples and Best Buy are taking big steps to drive online sales, embracing technology to catch up with Amazon. Both have the potential to greatly increase online sales over the next few years.

For years Amazon.com(NASDAQ:AMZN) has been stealing sales away from traditional retailers. While these retailers have tried to jump on the e-commerce bandwagon, many were left in the dust. In many cases Amazon's website blows the competition's websites away, with easy navigation and relevant product recommendations, not to mention a vast collection of product reviews. Amazon's Prime service provides free two-day shipping, and its Kindle Fire tablets are sold essentially at cost in an effort to sell even more products through the device. If Amazon is good at anything, it's convincing people to buy stuff.

Retailers are finally getting seriousAfter years of retailers accepting Amazon's e-commerce dominance, it seems that a few companies are finally taking steps to fight back. Among them are office supply retailer Staples(NASDAQ:SPLS) and consumer electronics retailer Best Buy(NYSE:BBY). With retailers putting a renewed focus on e-commerce, Amazon could be facing stiffer competition in the near future.

Staples is actually the number two online retailer already, behind Amazon, but weakness in its retail operation is pushing the company to improve its online channel. Earlier this month Staples announced its acquisition of Runa, a company which specializes in e-commerce personalization technology. Runa will allow Staples to offer online shoppers real-time personalized offers in an attempt to convert a higher percentage of website visitors into buyers, and to prevent shoppers from abandoning the website mid-order.

Here's how Runa works. After receiving offers a company is willing to make, Runa dynamically changes prices to compete directly with Amazon. Free shipping offers can be matched, for example, and discounts can be beat, with the offer customized to the particular user. Being able to match or beat Amazon on price without needing to resort to a site-wide discount could prove to be just the edge Staples needs.

Staples also took the step of greatly expanding the assortment of products available on its website. The company now offers 150,000 different products on its website, and by the end of the year it expects to double that number.

One promising initiative is Staples Connect, a recently announced hub and associated app which allows consumers to control many home products using a smart phone. Staples is working with Linksys on the hub, and companies such as Honeywell, Philips, and General Electric will release compatible products when the program launches later this year. The app can be used to control lights, thermostats, blinds, alarms, and any other compatible device, and schedules can be set to change settings automatically.

This attempt at bringing home automation to the mass market, if successful, could greatly boost sales for Staples. The proprietary nature of the hub, along with the myriad of brands supporting it, gives the program a real chance at success. Staples' existing relationships with businesses could help the company push office automation as well.

Staples is taking big steps to remain relevant and compete against online retailers, expanding into new areas and embracing technology to drive sales. If the execution is as solid as the plan, then Staples is in good shape going forward.

Catching up with the timesBest Buy has never had a strong e-commerce focus, and the Best Buy website showed it. Now, under the leadership of CEO Hubert Joly, e-commerce is taking center stage. Best Buy's website gets a billion annual visitors, but the company only converts about 1% of those into buyers. That's about half of the average among retailers, which leaves plenty of room for improvement.

Joly is aggressively hiring tech workers in an effort to revamp the website, with 100 new positions planned. Product reviews and buying guides are being added to the website, and a new search system was introduced earlier this year that replaced the unreliable and outdated previous system. The website will also be able to recommend additional items to customers, something that Amazon has been doing for years.

The company also took the step of integrating its rewards system directly into the website. Previously, a consumer looking to use reward points would need to log into two sites. Now it's all integrated into the main web site; Best Buy is catching up with other retailers.

One new initiative which online retailers like Amazon can't match is Best Buy's ship-from-store program. In the past, all online orders would be fulfilled at special distribution centers. When a product was out of stock online it was often in stock in nearby stores. Best Buy began shipping directly from stores earlier this year with 50 stores participating in the trial, and it plans to expand the program to 200 stores before the holiday season.

Combined, these initiatives could greatly boost Best Buy's share of the online consumer electronics market. Best Buy is leveraging its physical stores, once viewed as a liability, to improve its e-commerce channel, and an aggressive price matching program in-store should help drive traffic this holiday season. The steps being taken by Best Buy are long overdue, and the potential exists to double online sales within a few years.

The bottom lineAlthough it took years, traditional retailers may finally be catching up with Amazon. Staples is embracing technology to drive online sales, looking to offer better deals than Amazon and steal away sales. Best Buy is leveraging its store base and revamping its website, bringing its e-commerce operations into the modern era. I expect online sales for both Staples and Best Buy to accelerate going forward, and Amazon could start to feel some serious pressure from these two companies.