Online shopping is hard to beat — price, selection, free shipping. That’s great for consumers, but very hard on local brick-and-mortar stores, and even on larger retail chains, who are closing their doors after years of operation. But some small retailers have found a way to not just survive but thrive in this new landscape.

It’s early morning at Gulf of Maine Books in Brunswick, and the owners Beth Leonard and Gary Lawless are getting ready to open their 1,500-square-foot store, jam packed with books. Lawless says many customers are surprised to find an independent bookstore in a town of this size.

“In the summer we get people coming in and saying, ‘We used to have a bookstore in our town.’ They get kind of nostalgic,” Lawless says.

The story they tell, he says, usually goes like this.

“They had a small bookstore and then a chain store came in and put the small store out of business,” Lawless says. “Then the chain store left and now they have a shopping center with empty space in it and no access to books, which forces you to go online anyway because you don’t have access to the stuff.”

It’s a common narrative and one that doesn’t just affect bookstores. Amazon sold over $200 million worth of retail products in Maine in 2015, according to a study by Civic Economics — that’s as many products as 143 brick and mortar stores might have sold instead.

Leonard believes consumers are aware of the consequences of online shopping and don’t want to see another empty storefront.

“Local people want to have a bookstore in town and so they understand that they have to patronize it in order for that to happen,” she says.

“It’s tactile,” Lawless says. “People like to see and hold books, but they also come here for conversation I think. Beth for a while after the recent election said we were doing book therapy. People were coming here because it’s a place where they could go and talk about how they felt in a public space.”

“People are hungry for gathering places, and bookstores represent maybe even more so than their local libraries a place where you feel safe, where people coming in are interested in ideas and reading,” says Steve Fischer, the executive director of The New England Booksellers Association.

Fischer says that more independent bookstores have opened than closed since 2015. And the numbers show they’re doing well. The biggest hurdle right now, he says, isn’t about consumer habits or pricing.

“Interestingly enough in New England, one of the challenges doesn’t have anything to do with how well the bookstores are doing. It’s the external forces — real estate,” he says.

More than half of the independent shop owners surveyed by the Institute for Local Self-Reliance in 2016 said that they were worried by the rising cost of local rents.

The rising price of real estate was definitely a consideration for Emily Russo and Josh Christie when they opened up their bookstore in Portland.

“It was really important for us to get in while we could,” Christie says. “This was not only the right time for us to get onto the East End but probably the last time we could have afforded to get a space here.”

After years in the bookselling business, Christie and Russo finally got their own shop, Print: A Bookstore, off the ground this past November. Russo says they want to offer their customers something they can’t get online — the chance to meet their favorite writers.

“It is so great to bring authors into this space,” she says. “To introduce readers to writers that they love and to introduce readers to ones that they have never necessarily heard of before.”

These personal experiences get people into the store and buying books, even if they are a little more expensive. Big internet retailers often sell books under market price to draw people to their sites — Print: A Bookstore can’t compete with those prices, but Christie says his customers get that.

“Our customers in Portland … is very understanding of buy local movements and the fact of, this is something that is kind of implicit but we explain if we’re asked about, the fact that we contribute to the tax base here in Portland,” he says.

Independent bookstores aren’t the only local retailers who have found a way to compete with online sellers. But the secret is the same.

“We really pride ourselves on the relationships that we establish with our guests. Just we really encourage that visit to come in our store,” says Scott Heinrich, digital marketing director at Lamey Wellehan shoes, which operates six stores across Maine.

Heinrich says the family-run business has been succeeding at selling shoes for over 100 years because it offers great in-store experiences where customers get to talk to experienced staffers who know the product.

“You are not going to come into our store and pull a shoe off the store, try it on and see if it fits. You are going to be professionally greeted by one of our associates, they are going to go ahead sit and measure your foot,” he says.

Lamey Wellehan hasn’t been immune to market changes and has seen a number of store locations come and go. But for these survivors in the age of Amazon, the key is providing customers with what they can’t get online: a place to meet, flip through the pages of a new book or try on a new pair of shoes that fit just right.

This article appears through a media partnership with Maine Public.