It used to be that renting an apartment in Cambridge's funky triple-deckers or two-family homes didn't rival the cost of tuition at one of the city's storied universities, Harvard and MIT.

Now, renting in Cambridge can feel like that — something critics say is made tougher by short-term rental websites like Airbnb, through which property owners can make more money renting out apartments or homes by the night instead of a yearlong lease.

The debate over services like Airbnb — often criticized for essentially turning apartments into hotel rooms, putting upward pressure on housing costs and driving out longer-term tenants who can't afford rising rents — has raged for years in major cities. But it is also keenly felt in event-heavy college towns, particularly ones that also are tourist destinations or are near them, like Cambridge, next to Boston.

Get Breaking News Delivered to Your Inbox

Jennifer McConnell, a high school Spanish teacher who rents out rooms in her Cambridge brownstone through Airbnb, said she'd otherwise have trouble covering her expenses.

"It's been a game changer both financially, because it's allowed me to stay in my home, but also emotionally because it's filled up my home with guests," said McConnell, whose guests included a woman from Germany who stayed for seven weeks while taking a graduate course at Harvard.

Short-term rentals have caused enough concern in Cambridge that the city council last month approved new regulations requiring people offering short-term rentals to live in the same building and undergo an inspection once every five years.

Picturesque Boulder, home to the University of Colorado, last year began requiring property owners to have a license to rent to visitors. Evanston, Illinois, a Chicago suburb that is home to Northwestern University, also has beefed up rules on rentals of less than 30 days.

Massachusetts Lodging Association President Paul Sacco hailed the Cambridge rules, saying they're needed to prevent "illegal hotels" in the city.

Airbnb said it is not to blame for spiking housing costs. Only a small percentage of the Cambridge housing stock — about 140 homes or apartments — are rented through its website for more than 172 nights a year, it said. That's Airbnb's estimate for someone who is effectively doing short-term rental as a business.

Interest in renting rooms through Airbnb often jumps during graduation or a big football game, said Will Burns, public policy director for Airbnb.

Visiting scholars and families of college students also fill rooms. In Cambridge, an annual rowing event on the Charles River also creates demand.

In the past 12 months, Airbnb said, there have been 90,000 guest arrivals in Cambridge through its service in the city of about 110,000.

Kirsten Rulf, a 36-year-old research fellow at Harvard Law School, said she used Airbnb for two weeks in August 2015 before finding permanent housing. The small, furnished room in a larger apartment cost her $1,500 for 14 nights, she said.

"For me that was the best option, because hotels are super expensive, especially in August," said Rulf, who hails from Mendig, Germany.

A tour of Airbnb's website reveals how much of a draw colleges are — at least according to those trying to rent out rooms.

"Perfect spot to visit MIT, Harvard, BU (Boston University)," reads one ad. "The house is within walking distance to the Princeton University Campus," reads another ad. A third boasts, "Great 'shotgun' style apartment on a nice street in New Haven which is a short ( 5min) walk to Yale."

Some institutions, including Boston's Emerson College, have even busted students for trying to rent out dorm rooms.

An agreement on graduate housing at Yale University states that while students are allowed to have guests for short visits, "Guests who pay rent and/or guests found through Airbnb or similar arrangements are prohibited."

In Cambridge, the median rent has soared to a daunting $3,000 a month, according to real estate data provider Zillow. In Boston, which sees its population swell every September when students flock back, the median rent is $2,700.

According to Zillow, the median monthly rent in Evanston is nearly $1,700. The rent in Ithaca, New York — hub of the touristy Finger Lakes region and home to Cornell University — is about $1,600, according to the real estate firm Trulia.

A 2014 report by New York Attorney General Eric Schneiderman found "private short-term rentals displaced long-term housing in thousands of apartments" in New York City.

McConnell, the Cambridge resident who opens her home to Airbnb clients, said she's OK with the city's regulations but isn't thrilled about the inspections. She said she also doesn't fault Airbnb for the city's soaring housing and rental costs.

"The middle class person has a hard time finding a place," she said. "I don't blame that on Airbnb. People couldn't afford to rent those places anyway."