Relatives are being asked to think twice before visiting patients at Yeovil District Hospital in a bid to halt the spread of the norovirus.
Strict hygiene procedures have been stepped up after patients and staff on three wards were affected.
Alison Moon, Director of Nursing, said: "Infection control is an absolute priority and we know that people are keen to help us reduce the risks."
Wards 6A and 8A and one bay on 8B were closed to new admissions on Tuesday.
"Patients in hospital, particularly those who are very young, frail or elderly, are much more vulnerable to the bug, so visitors are being asked to stay away if they have any symptoms of nausea, sickness, or stomach upset," added Ms Moon.
"We know that people find it hard to stay away when they have relatives or friends in hospital, but we are asking them to think twice before visiting, especially if they are feeling at all unwell, and to follow strict hygiene rules."
Deep cleaning of the affected areas is under way, with regular meetings to monitor progress and to keep staff informed.
The temporary closure to new admissions is being kept under constant review. It will be lifted once no more patients or staff are developing symptoms.