The Portland, Oregon, City Council has voted to legalize short-term rentals in single-family homes, giving added legitimacy to rental websites such as Airbnb.

Homeowners will be allowed to rent one or two bedrooms once a safety inspection is done and neighbors are notified.

The city is requiring rental websites to collect lodging taxes. Airbnb says it started doing that July 1 in anticipation of Wednesday's vote.

Mayor Charlie Hales and the city commissioners say they want Portland to be active in what they called the "sharing economy." Later this year, they plan to discuss whether to also legalize short-term rentals in apartment buildings.