How Home Depot finally discovered the Internet E-mail Tweet Facebook Google Plus Linkedin Share icons by Jennifer Reingold @FortuneMagazine July 9, 2014, 5:16 AM EDT Frank Blake, the CEO of the Home Depot HD , and I are out for a stroll—really, it’s more of a hike—across the company’s sparkling new, 1.1 million sq. ft. direct fulfillment center in McDonough, Ga. The Locust Grove center, as it’s known, is a humongous warehouse, yes, but it’s also a cathedral built in homage to a customer that the $79 billion-in-revenues company ignored for a very long time; the do-it-yourselfer who orders his or her stuff from home rather than trudging to one of Home Depot’s 2,200 stores. We pass row and rows of enormous boxes stacked 50 feet high, full of 340-lb. vanities. Then we watch items as small as house numbers and as large as toilets travel down massive conveyor belts, where they are trafficked directly into bays holding trucks by orange-apron wearing employees. Almost none of those trucks are bound for a Home Depot store. Instead, they’ll be heading directly to your house or mine. “The idea,” says Blake, “is that we want to be able to serve our customers how they want to be served.” The fact that customers increasingly like to buy online is not exactly news. Stifel Financial estimates that in 2014, fully half of retailers’ overall sales growth will come from online orders. And while Home Depot’s stellar performance under Blake’s seven-and-a-half-year tenure has made the company the happy exception to the new rule—that there are too many physical retailers taking up too much space in hopes of selling too much stuff—it has been for far too long behind the online curve. “That’s fair to say,” admits Blake, 64, with a wry smile. Whether Home Depot could even have pulled off a substantive e-commerce push much before now is another matter. When Blake succeeded Bob Nardelli as CEO on Jan. 3, 2007, the company was in crisis, with stagnant sales, poor customer service and an antiquated supply chain. Home Depot’s 2,000-plus stores could barely communicate with each other, let alone cater to online buyers. “Seven years ago we really could not have done this facility,” he says. Blake decided to stop opening stores—anathema for any retailer—and focus on simply making the store experience better. He did. The stock has returned 145% (with dividends reinvested) from when Blake assumed the CEO mantle to the end of June 2014, compared with a total return of 60% for the S&P 500. On an annualized basis (share-price change only) Home Depot stock clocks the S&P, 9.7% to 4.3%. And last year, Home Depot’s same store sales growth was the best it has been since the late 1990s. “Not having to build the stores has freed us up to make significant capital expenditures,” he says. Before Home Depot could focus on the Internet, the company’s entire supply chain needed to be overhauled, a process led over the past several years by Mark Holifield, EVP of supply chain and product development. But now the company is catching up to the prevailing standard, analysts say, and what was once a huge liability is beginning to become an asset if you consider its online potential—and the trajectory so far. In 2013, the company received just 3% of its sales from online purchases. Meager, yes—but that was double the share from the previous year. With the opening of the direct fulfillment center in Georgia (two more DFCs will open this year—one in California, another in Ohio), the company is able to ship up to 700,000 different SKUs (types and variations of products) online—and ship 100,000 of these items the same day an order is received. An average store, by comparison, has about 35,000 SKUs on hand. That’s a huge shift, and one that makes Home Depot much more competitive with the likes of Amazon AMZN . The DFCs will also be used to ship items directly to stores, if customers prefer to pick up products themselves. Unlike with Amazon’s warehouses, Home Depot’s DFC is set up to handle large packages, primarily. (Some 80% of Home Depot’s products weigh more than five pounds.) Blake believes that increasing the speed and quality of delivery here will help it take share. (Plus, he jokes, drones won’t work so well with floor coverings.) “We think we have a competitive advantage as a bricks-and-mortar retailer, and we want to leverage that,” he says. A competitive advantage as a bricks and mortar retailer? It seems like an odd thing to say, given the incredible success of pure online retailers relative to the big boxes. But Blake does have a point, especially because he has restored the in-store experience that made Home Depot a destination for so long. It’s wrong to think about what Home Depot sells as “online,” or “in-store,” says Blake, who points out that half of his customers go to HomeDepot.com before they make an in-store purchase, and that one-third of online orders are picked up at a physical store location. Customers want access to both the service of the store and the convenience of the Internet. The DFC, if it does what Blake says it will, can help make that experience more seamless.