Home-sharing sites Airbnb Inc. and Expedia Inc.’s HomeAway have reached a settlement with San Francisco that makes it easier for rental hosts to register with the city and helps the companies avoid costly fines.

The settlement ends a lawsuit filed in June by the two sites over rules that impose fines of $1,000 a day for each host who isn’t properly registered with the city to use their short-term rentals. The companies argued the ordinance—which requires hosts to register in person and present evidence to the websites—is too onerous and results in too many violations. Only about 2,100 hosts on Airbnb and HomeAway have registered with the city since the legislation was passed in 2015, compared with some 8,000 San Francisco hosts on Airbnb alone.

Under the settlement, the fines will still exist but Airbnb and HomeAway will be in control of the registration process. Hosts will register through the company websites, which will then pass the information along to city officials for verification. The companies view this as a win because it should speed up the process and presumably removes obstacles for hosts signing up.

The sites also will provide the city with a monthly accounting of listings, and they agreed to cancel future bookings and deactivate listings when the city finds invalid registrations.

San Francisco, Airbnb’s hometown, passed the legislation in 2015 partly to prevent hosts with multiple dwellings from listing on the sites and keeping long-term housing off the market. The city said it can compel the home-sharing sites to deactivate hosts who are improperly registered.