The city of Vancouver passed new rules on Tuesday banning homeowners from renting out certain kinds of property on short-term rental websites like Airbnb, as part of an attempt to deal with a housing shortage that has led to soaring rents.
Homeowners will not be allowed to list homes that are unoccupied in the long term, entire condos, or secondary suites – self-contained dwellings within a house or on the same grounds as the main property.
They will be allowed to rent out a room in their principle residence, or rent their principle residence on a temporary basis when, for example, on vacation, the city said, though they will have to pay a licensing fee to the city government of C$49 ($38.50) per year.
“Housing is first and foremost for homes, and I’m very pleased to see this approach to short-term rentals move forward,” said Vancouver Mayor Gregor Robertson in a statement.
The new rules are expected to free up about 1,000 units for long-term rentals, while also providing a legal framework for homeowners who want to use websites like Airbnb and Expedia’s HomeAway.
Vancouver is Canada’s most expensive property market, which has seen prices jump 75 percent in five years, and rents climb sharply. It has become a hotly contested issue for local residents, who have blamed foreign buyers and short-term rentals, among other issues, for making housing unaffordable.
Earlier this year, the city implemented a steep tax on empty homes, which it hopes will add up to 25,000 units to the long-term rental market.
Get Data Sheet, Fortune’s technology newsletter.
Airbnb said in a statement that it would continue to operate in Vancouver and supports the city’s efforts to “recognize and regulate home sharing.” HomeAway did not immediately respond to a request for comment.
The housing shortage has been compounded by entire units being removed from the long-term rental stock to be listed as short-term rentals on homesharing websites, city officials say. A short-term rental is anything under 30 days.
Homeowners who use the websites argue that short-term rentals provide flexibility and that they can earn far more money listing on a service like Airbnb than renting on a monthly basis, important in an expensive city like Vancouver. ($1 = 1.2726 Canadian dollars)v