On West 34th Street between Ninth and 10th avenues, there’s a building with a landscaped rooftop terrace, a chef who provides two meals per day (leg of lamb with ratatouille casserole at a recent dinner) and a housekeeper who changes the sheets once a week. Here, at the 376-unit Webster Apartments, one can pay as little as $1,430 per month in rent.

There’s just one catch. To live there, you must be female.

The Webster is one of the last women-only residences in New York City. By The Post’s count, there are just nine left, including Chelsea’s Jeanne d’Arc Residence, the East Village’s Pink Dorms and Midtown West’s Centro Maria Residence — all boasting rich histories and satisfied modern-day denizens. Rules vary by location, with some imposing curfews and banning alcohol, but they all have one thing in common: no boys allowed.

But when the Webster opened in 1923, there were dozens of hotels and homes across Manhattan built expressly to serve women. The such first housing was developed in the late 19th century as women started working out of the home. By 1899, there were between 60,000 and 70,000 self-supporting women in New York, according to historian Nina Harkrader.

“From the perspective of how society is structured, this was very disruptive,” says Harkrader, who is working on a book about the history of women-only housing. “Large numbers of women in the city created a lot of unease.” The general public worried about the safety and propriety of these independent pioneers, so many of the first buildings had a “heavy moral overlay.” Then, the homes served as a stopover on the road to marriage. “They were about raising women to be good wives,” adds Harkrader.

But as more women started graduating from college during the first two decades of the 20th century, there was a shift. “You began to see the term ‘business woman,’ ” Harkrader says. “These were not young women who wanted to be told how to behave.” Many of the residences that opened during this heyday were started or run by women, like the Martha Washington on East 29th Street (now a hotel) and the Panhellenic Tower on Mitchell Place off First Avenue (now the Beekman Tower, which has a hotel and apartments).

The most famous women-only residence was the Barbizon, opened in 1927 on East 63rd Street. Once a place where rooms went for $24/week — and now condos — Lauren Bacall, Joan Crawford, Grace Kelly and Sylvia Plath (whose novel “The Bell Jar” features the hotel) were celebrities who cemented it as a stylish and sought-after place to live.

It’s not clear just how many women-only residences once existed, but they started to dwindle as real estate became more expensive later in the 1900s. Some hotels started admitting men (the Barbizon in 1981); many buildings were sold off and redeveloped. The most recent to succumb to developers were the Brandon Residence, which sold for $42 million in 2017, and the El Carmelo Residence, whose West 14th Street building was razed to make way for luxury condominiums.

Of the nine that remain, seven are run by Christian charities (six by Catholic nuns). But the Webster is, and always has been, for the working woman. It was founded by brothers Charles and Josiah Webster, who came to New York to work with Roland H. Macy, whose eponymous department store employed hundreds of young women.

They needed a place to live. Ninety-six years after opening, it houses between 800 and 1,000 working women per year. An aspiring resident must be a full-time intern or be working a minimum of 35 hours per week. All rooms are private, and rent — from $560 to $940, calculated on a sliding scale based on salary, every two weeks — includes the two meals (residents rave about the food), as well as laundry and Wi-Fi. There’s a theater room and a library, plus two lounges and a hallway of “beau parlors” — a vestigial term for spaces where women could entertain male guests; today, they’re equipped with TVs and largely function as miniature living rooms (where male guests are allowed). In addition to the rooftop, with front-row views of the Empire State Building, there’s also a landscaped backyard.

“People are shocked when you give them a tour,” says resident Andrea San Miguel, a 25-year-old marketing coordinator at NBC. “They can’t believe this is here.” San Miguel, who moved to New York from Miami for an internship, has lived at the Webster for two and a half years.

Renting an apartment in New York can be cost-prohibitive even if you’re making a decent salary; you need first and last month’s rent, plus a security deposit and sometimes a broker’s fee. But that kind of financial commitment isn’t required at these buildings.

Hope Stagnara, 40, moved into the Webster about a year ago when she relocated from the West Coast. “I would love to have a kitchen,” she says, “but apartments around here are just another level of expensive that I had no idea about.”

At Jeanne d’Arc — one of the longest-running residences, having opened its doors in 1898 as the Jeanne d’Arc Home for Friendless French Girls — the accommodations are a little more lived-in, but it’s coveted for its location on West 24th Street. It’s also the cheapest option: Shared rooms start at $570 per month, while the priciest private room rents for $920.

No meals are provided, but it’s one of the only residences that has a full kitchen (with four stoves and four sinks) for residents. Common spaces include a small library, a rooftop deck and a non-denominational chapel, where Catholic Mass is held once a month and residents host group meditation sessions.

“I wanted a place that had a spiritual sense,” says resident Joana, a 25-year-old web developer who asked that her last name not be used because of security concerns. (A fellow resident had a man follow her home.) After a bad experience with roommates in Queens, Joana sought out Jeanne d’Arc. “If the residence had guys as well, there would be a lot of distractions,” she says. “I feel safer that I’m just with girls and with the sisters.”

Most of these outposts have limits on how long renters can stay. “We’re meant to be a stepping stone for women, not a permanent residence,” says Tara Scott, the Webster’s director of marketing and business development. “When someone leaves and gets their own apartment, we take it as a success story,” says executive director Siobhan McManus. “They’re getting to the next level. That’s adulting, right?”

Many of the residences also provide resources to navigate a competitive city. The Webster invites guest speakers (recently, a former resident who’s now a published author gave a talk) and hosts resume-writing classes. At the Pink Dorms, a students-only residence on 14th Street in the East Village, women forge pre-professional connections.

“All of the students here are kind of artsy,” says Jaime Kenter, 19, a student at the Make-Up Designory (MUD) who has lived there since October 2018. The Pink Dorms partners with schools like MUD and the Lee Strasberg Theatre & Film Institute, so its 13 rooms (three single, the rest shared) are populated by aspiring actresses, dancers and makeup artists. “I’ve been able to build a network here,” says Kenter, whose first roommate attended Strasberg and asked Kenter to do makeup for her student films.

There’s a palpable sense of camaraderie. “The experience will shape you into a different person than if you’re just alone in your apartment,” Joana adds. “This place can make a difference in your life.”

The need for a supportive community of like-minded women gave rise, for example, to coworking juggernaut The Wing. “With the #MeToo movement, victims of sex trafficking and all of the abuse,” says Eileen Piazza, the director of Jeanne d’Arc, our mission “is more relevant and more needed now than it was 120 years ago.”

Women-only office spaces are multiplying, but residences are dwindling. “There should be more places like this for ladies,” says Stagnara. “It’s a scary world out there.”

Girls next door

Interested in living in a women-only residence? Here’s the rundown on the city’s nine remaining options.

The Webster Apartments

419 W. 34th St.

Rates: based on salary, $560 to $940 bi-weekly

Included: Two meals, Wi-Fi, laundry, on-site events, linens changed once a week, private bedroom with a sink

Amenities: 24-hour security, recently renovated common spaces, including multiple lounges, a backyard and a killer rooftop terrace. Alcohol is permitted.

Jeanne d’Arc Residence

253 W. 24th St.

Rates: $570 to $920, plus $35 utilities, per month

Amenities: A full kitchen, two rooftop terraces, a chapel, a dining room, lounge and coin-operated laundry.

The Markle Evangeline Residence

123 W. 23rd St.

Rates: $1,430 to $1,995 per month

Included: Wi-Fi, two meals per day, a private bathroom

Amenities: Exercise room, two meals per day, 24-hour security, pay-per-use laundry

Saint Agnes Residences

237 W. 74th St.

Rates: $875 to $1,350

Amenities: Kitchen and dining room, free Wi-Fi, in-building laundry, rooftop and backyard

Sacred Heart Residence

145 E. 39th St.

Rates: $350 per week

Amenities: Two meals Monday-Friday

St. Mary’s Residence

225 E. 72nd St.

Rates: $266 per week + $286.00 deposit, with a three-week minimum

Amenities: Weekly housekeeping in the room and common areas. Each floor has a lounge with cable TV and a kitchenette.

Centro Maria Residence

539 W. 54th St.

Rates: $215 (for a triple share) to $250 (private room) per week

Amenities: Two meals per day (only breakfast on Saturdays), chapel

Pink Dorms

307 E. 14th St.

Rates: $1,350 to $2,800 per month

Notes: Students only

Amenities: Private bathroom in each room, lounge, free Wi-Fi

St. Joseph’s Immigrant Home

425 W. 44th St.

Rates: $825 to $1,050 per month

Amenities: Shared kitchen and dining room, free Wi-Fi, chapel, piano practice room