SAN BRUNO, CA - MAY 22:  A sign on the exterior of a Lowe
SAN BRUNO, CA - MAY 22: A sign on the exterior of a Lowe's home improvement warehouse store is seen May 22, 2006 in San Bruno, California. Lowe's, the second largest home improvement store chain in the world, reported quarterly net earnings of $841 million, up almost 44 percent from the previous year at this time. (Photo by Justin Sullivan/Getty Images)
PHOTO: Justin Sullivan/Getty Images North America/Getty Images
Now playing
00:54
Lowe's is closing 47 stores
PHOTO: Orangetheory Fitness
Now playing
02:13
This gym is actually opening studios during the pandemic
Now playing
02:24
How holiday spirit is surging despite the Covid-19 pandemic
NEW YORK, NEW YORK - NOVEMBER 19: A view of the window display as Macy
NEW YORK, NEW YORK - NOVEMBER 19: A view of the window display as Macy's Herald Square unveils Give, Love, Believe 2020 Holiday Windows on November 19, 2020 in New York City. (Photo by Eugene Gologursky/Getty Images for Macy's)
PHOTO: Eugene Gologursky/Getty Images North America/Getty Images for Macy's
Now playing
00:56
Macy's unveils holiday window display with gratitude theme
PHOTO: CNN/Target/Design by John General
Now playing
02:36
It's official: Black Friday is irrelevant
Now playing
02:23
Party City CEO: Consumers still want to celebrate together
NEW YORK, UNITED STATES - 2020/07/08: People wearing face masks shopping inside a retail store in Manhattan as the city enters phase 3 of reopening amid the coronavirus pandemic
As New York City enters phase 3 of reopening retail stores for indoor shopping, restaurants have been postponed for indoor dinning. The U.S. Department of Health recorded a total of 3,219,999 infections, 135,822 death and 1,426,428 recovered since the beginning of the outbreak. (Photo by Braulio Jatar/SOPA Images/LightRocket via Getty Images)
NEW YORK, UNITED STATES - 2020/07/08: People wearing face masks shopping inside a retail store in Manhattan as the city enters phase 3 of reopening amid the coronavirus pandemic As New York City enters phase 3 of reopening retail stores for indoor shopping, restaurants have been postponed for indoor dinning. The U.S. Department of Health recorded a total of 3,219,999 infections, 135,822 death and 1,426,428 recovered since the beginning of the outbreak. (Photo by Braulio Jatar/SOPA Images/LightRocket via Getty Images)
PHOTO: Braulio Jatar/SOPA Images/LightRocket/Getty Images
Now playing
01:38
US retail sales improved in September
PHOTO: thehouseofdrew.com
Now playing
02:01
Justin Bieber's footwear collaboration overwhelms site
PHOTO: Walmart
Now playing
01:01
See what's new inside Walmart stores
WHEATON, MARYLAND - APRIL 16: Customers wear face masks to prevent the spread of the novel coronavirus as they line up to enter a Costco Wholesale store April 16, 2020 in Wheaton, Maryland. Maryland Governor Larry Hogan ordered that all people must wear some kind of face mask to protect themselves and others from COVID-19 when on public transportation, grocery stores, retail establishments and other places where social distancing is not always possible. (Photo by Chip Somodevilla/Getty Images)
WHEATON, MARYLAND - APRIL 16: Customers wear face masks to prevent the spread of the novel coronavirus as they line up to enter a Costco Wholesale store April 16, 2020 in Wheaton, Maryland. Maryland Governor Larry Hogan ordered that all people must wear some kind of face mask to protect themselves and others from COVID-19 when on public transportation, grocery stores, retail establishments and other places where social distancing is not always possible. (Photo by Chip Somodevilla/Getty Images)
PHOTO: Chip Somodevilla/Getty Images
Now playing
02:32
How masks are reshaping the face of the retail economy
3119 E Third Street Dollar General in Dayton, OH on March 12, 2020.
3119 E Third Street Dollar General in Dayton, OH on March 12, 2020.
PHOTO: Maddie McGarvey for CNN
Now playing
06:07
Dollar General's business is booming. It's also vulnerable to crime, police say
Now playing
03:01
How private equity is gutting retail
Now playing
01:55
All retail bankruptcies are not the same. Here's what you need to know
Now playing
02:44
Is T.J.Maxx recession-proof?
LOS ANGELES, CA - APRIL 10:  Customers carry bags from  Bed Bath & Beyond store on April 10, 2013 in Los Angeles, California. The home goods retailer is expected to release fourth-quarter earnings figures after the closing bell.  (Photo by Kevork Djansezian/Getty Images)
LOS ANGELES, CA - APRIL 10: Customers carry bags from Bed Bath & Beyond store on April 10, 2013 in Los Angeles, California. The home goods retailer is expected to release fourth-quarter earnings figures after the closing bell. (Photo by Kevork Djansezian/Getty Images)
PHOTO: Kevork Djansezian/Getty Images
Now playing
00:58
Why Bed Bath & Beyond is in big trouble
A Kohl
A Kohl's Corp. store stands in Concord, California, U.S., on Tuesday, Feb. 24, 2015. Kohl's Corp. is expected to release earnings figures on Feb. 26. Photographer: David Paul Morris/Bloomberg via Getty Images
PHOTO: David Paul Morris/Bloomberg via Getty Images
Now playing
01:25
Kohl's needs to reinvent itself. Are Aldi and Amazon the key?
(CNN Business) —  

In another sign of the times for retail, Lowe’s is closing 47 North American stores.

Lowe’s said Monday that those locations are underperforming and the decision will help the hardware chain focus on its most profitable stores.

“The store closures are a necessary step in our strategic reassessment as we focus on building a stronger business,” said CEO Marvin Ellison, in a statement.

Retail stores are struggling to adjust to the rapid rise of online shopping, particularly from Amazon (AMZN). Many successful retailers with big stores have adjusted their business strategies to make better use of their physical spaces. Others, including Sears, Kmart and Toys “R” Us, failed.

Lowe’s and its rival Home Depot have proven to be largely Amazon-proof, because Amazon does not sell lumber or other heavy, bulky home improvement products.

But Lowe’s is struggling to keep up with Home Depot. Last year, Home Depot’s revenue hit more than $100 billion, while Lowe’s sales were below $70 billion. Lowe’s stock price has also lagged behind its rival, leading to pressure from activist investors.

Earlier this year, Lowe’s gave the reins to a home improvement veteran to turn around the company. Ellison was a top executive Home Depot for more than a decade, and most recently served as JCPenney’s (JCP) CEO.

Ellison has already made some big strategic decisions, including closing all of its Orchard Supply Hardware stores and slashing inventory at its Lowe’s stores.

He believes targeting professional home builders and construction companies with higher-quality tools and equipment, additional discounts, and better customer service will improve Lowe’s. Sales to home building pros make up around 45% of Home Depot’s sales, but only around 30% of Lowe’s sales, according to analysts at Wedbush Securities.

Lowe’s (LOW) will shut down 20 stores in the United States and 27 in Canada. The company said that a “majority” of the shuttered stores are within 10 miles of another Lowe’s location. Additionally, four offices and specialty facilities in Canada will also be closed.

The stores will be closed before Feb. 1, 2019. The company will try to find jobs at nearby stores for its employees affected by the closings.

Lowe’s said it would close these stores:

Alabama

1100 Bankhead Hwy SW, Graysville

California

26501 Aliso Creek Rd, Aliso Viejo

13300 Jamboree Rd, Irvine

720 Dubuque Ave, South San Francisco

750 Newhall Dr, San Jose

Connecticut

48 Boston Post Rd, Orange

Illinois

1333 Schaefer Rd, Granite City

7735 Grand Ave, Gurnee

Indiana

6221 US Hwy 6, Portage

Louisiana

5770 Read Blvd, New Orleans

Massachusetts

599 Thomas Burgin Pkwy, Quincy

Michigan

4274 E Court St, Burton

2100 T.A. Mansour Blvd, Flint

Minnesota

2015 Bassett Dr, Mankato

Missouri

11974 Paul Mayer Ave, Bridgeton

3180 N Hwy 67, Florissant

New York

2008 Broadway, New York

635-641 6th Ave, New York

Pennsylvania

250 South Conestoga Dr, Shippensburg

Texas

3500 W Airport Fwy, Irving

British Columbia

(Rona) 105-1015 Columbia Street, New Westminster

Alberta

(Rona) 11520 – 24th Street SE, Calgary

(Reno-Depot) 12330 Symons Valley Road NW, Calgary

Ontario

Rona:

1133 Dundas Street West, Mississauga

1692 Lakeshore Rd, Mississauga

132 Black Road, Sault Ste. Marie

943 Barry Downe Road, Sudbury

1575 Chemong Road, Peterborough

1452 Bath Road, Kingston

178 Water Street, Lakefield

Lowe’s:

6600 Yonge Street, North York

248 Northern Avenue, Sault Ste. Marie

Québec

Rona:

335, Route 209, Sainte-Clotilde-de-Chateauguay

870, boulevard d’Iberville, Saint-Jean-sur-Richelieu

723, boulevard L’Ange-Gardien, L’Assomption

788, rue Moeller, Grandby

134, boulevard Sainte-Rose, Laval

9200, boulevard Maurice-Duplessis, Montréal

1200, rue Mantha, Rouyn-Noranda

194, rue Principale, Ange-Gardien

100, rue du Parc Industriel, Saint Elzéar

Newfoundland

Rona:

825 Conception Bay Hwy, Conception Bay

53-59 Main Highway, Goulds

1297 Topsail Road, St. John’s

60 O’Leary Avenue, St. John’s

710 Torbay Road, St. John’s

239 Conception Bay, Bay Roberts

Correction: A previous version of this story misstated how many stores Lowe’s plans to close.

Nathaniel Meyersohn contributed reporting to this story