Finding an affordable place to stay for the night can be a headache for many travelers. Nowadays, short-term rentals are increasing in popularity thanks to services like Airbnb which list available short-term rentals in a given city. Many cities and states are finding ways to integrate these new companies into their local economies. Last week, Denver opened up registration for its new short-term rental (STR) license following the passage of a new law intended to better regulate short-term rental units.

Denver’s STR license will integrate Airbnb into the economy. The license requires a $25 registration fee to be renewed annually, and the collection of a 10.75 percent lodger’s tax from guests. The application for the license is also entirely online, which city officials hope will encourage more people to register. “We’re trying to meet our customers on their terms,” said Stacie Loucks, executive director of the Denver Department of Excise and Licenses. “I think some of the difficulties other cities have had is that they require you to go downtown.”

While Denver is trying to accommodate short-term rentals, New York recently passed legislation banning the advertisement of short-term rentals, which is currently awaiting the governor’s signature. Since renting a place for less than 30 consecutive days is already banned under state law, unless a building is zoned as a hotel or hostel, the bill would reinforce current legal norms. However, New York ought to amend its laws to allow short-term rentals and the advertisement of said rentals. Current laws in the state protect the hotel industry to the detriment of consumers.

Other cities are also looking to amend their laws to better handle the growth of the sharing economy. An international alliance of mayors from major cities across the world began looking to create a uniform regulatory framework for services like Airbnb and Uber last month.

While Denver has a better legal framework than New York, it is Arizona that has set the best example for short-term rentals. Gov. Doug Ducey signed SB 1350 into law earlier this year, prohibiting cities and municipalities from banning the listing and use of short-term rentals, except when narrowly tailored for public health and safety. A license is not required in Arizona; a renter would simply need to register with the Department of Revenue for tax collection purposes.

The government cannot prohibit you from having guests stay overnight, and it should not prohibit you from charging said guests for staying overnight either.