Expedia, Booking.com, Agoda, Hotels.com, ebookers and trivago have been investigated over high-pressure selling tactics and misleading discount claims, the competition watchdog says.
The Competition and Markets Authority (CMA) was concerned the sites were making rooms seem more popular than they were.
The sites will now say if commissions they receive affect the results.
They also agreed to be clearer with discount claims and hidden charges.
The CMA began its investigation in June 2018 but didn't name the comparison sites it was investigating.
"The CMA has taken enforcement action to bring to an end misleading sales tactics, hidden charges and other practices in the online hotel booking market," said CMA Chairman Andrew Tyrie.
"These have been wholly unacceptable."
Compare like with like
The CMA will now seek to make the rest of the sector follow the same rules as the six companies it has named, it said.
Consumer action group Which? welcomed the CMA's intervention and said the changes should be "swiftly implemented".
The companies have all now agreed to the following, the CMA said:
- To make it clearer how hotels are graded, including whether hotels paying the ranking sites more have received a position higher up the list
- To not give a false impression of a hotel's popularity to rush customers into making a booking. For example, when saying that other customers are looking at the same hotel as you, it should be made clear it they are searching for different dates. Some sites were also placing sold-out hotels within search results to put pressure on people to book more quickly. Sites have now committed not to do this, the CMA said
- To be clear about discounts and only promoting deals that are actually available at that time. The CMA found sites comparing a higher weekend room rate with a weekday rate or comparing the price of a luxury suite with a standard room
- To show charges such as taxes, booking or resort fees in the price
Not all of the six companies had fallen foul of all four of these bad practices, the CMA said.
"You can get some good bargains on these sites, but it is very important that you can trust what they say," Michael Grenfell, executive director of enforcement at the CMA told BBC Radio 4's Today programme.
"We will monitor them," he added.
The companies have until 1 September to comply with the demands, otherwise they could be taken to court.