Home sharing has exploded around the world, with short-term rentals benefiting both owners and travelers. But for traditional businesses that have been upended, or those neighbors whose quality of life has been damaged, there are many negatives.

That’s why it’s wrongheaded for New York state lawmakers to say no to this emerging economy and its largest website, Airbnb. Adapting old regulations and devising new ones is what’s needed.

Critics worry that the increase in short-term rentals has tightened the housing supply and made it even more unaffordable. They also point to a Harvard Business School study last year that showed hosts were less likely to accept bookings from renters with stereotypically black names than those with typically white names. Apartment dwellers have other legitimate concerns about transient renters: turnover, liability, cleanliness, noise and safety.

Last month, lawmakers in Albany passed a bill adding stiff penalties for those who advertise short-term rentals in many multiunit buildings. Such rentals — less than 30 days where the host isn’t present — have been illegal since 2010. We urge the governor to veto the bill and revisit the issue.

Making short-term rentals illegal may make sense for homes that aren’t primary residences, but someone who lives in a home year-round and wants to rent it briefly should be able to. A registration system, or requiring proof of primary residence, could guard against abuse. A cap on how long people can rent their homes — say, 50 days, or 10 weekends, a year, could help. Lawmakers should limit the rental of subsidized or rent-controlled units so no one profits from affordable housing. And there must be clear enforcement strategies and agreement on tax collection.

Starting now, including Airbnb, and learning from other states and cities, will ensure that significant legislation can be drafted in the next statehouse session. Meanwhile, Airbnb should be willing to compromise. Airbnb says it’s working to combat potential discrimination. And lawmakers can write the rules to limit the impact on overall affordability. Peer-to-peer sharing is fast becoming a key economic engine. We have to be prepared to accommodate it.