DURING PRESIDENT-ELECT Donald Trump’s inauguration late next month, the area’s apartments will be filled with fans and protesters who have booked rooms on Airbnb. To some, however, the tech upstart is just as controversial as Mr. Trump, and activists are demanding that governments across the country hamstring a hugely useful service. Regulators should resist cracking down.

The company, which is valued at $30 billion and operates in 34,000 cities in 191 countries, provides a platform for private homeowners to advertise rooms, apartments and whole houses to short-term visitors. But it has been accused of enabling racial discrimination, as owners decline to rent to minority customers, and of reducing scarce housing stock for permanent residents in crowded cities such as New York and San Francisco. Stories of landlords evicting renters in order to make their properties under-the-radar hotels have fueled fears that Airbnb is a menace. New York leaders reacted recently by slapping massive fines on owners who rent whole units for fewer than 30 days. That is too much, and cities such as the District should be more careful.

Perhaps sensing that it must work with regulators, Airbnb has adopted a reasonable tone lately. The company’s chief executive has admitted that “unscrupulous landlords” are “a problem,” but also noted that its platform is mostly used by ordinary folks. The firm produced a report showing that units rented through its platform tend to be more dispersed throughout cities than hotels are, serving poor and minority areas. Among other things, this suggests that renting private rooms can be a valuable income source for distressed communities, even as the service offers visitors more locations to stay.

The company has also promised to restrict what landlords can do on the company’s platforms in cities, such as San Francisco, concerned about preserving affordable permanent rental housing. For example: Owners cannot advertise more than one unit on the company’s platform in New York and San Francisco, which deters landlords from converting apartment blocks into de facto hotels. The company has praised a rule in New Orleans that bars owners from renting units for more than 90 days a year if they do not live in them. The company has also said it would work with local governments to pay hotel taxes. Regulations such as these are better than the punitive approach others have taken, and if Airbnb is smart, it will help apply them rigorously.

The company’s service should be a win-win-win, giving visitors cheaper and more abundant lodging options, allowing owners to put their unused rooms to good — and remunerative — use, and encouraging tourism in expensive cities. Regulators should aim to enable that vision — not to appease the hotel lobby or activists who shortsightedly favor preserving the status quo.