Chesterfield Royal Hospital is temporarily reducing visiting hours due to an outbreak of norovirus.
The hospital said visiting hours will be cut back to 2pm to 4pm and 6pm to 8pm until the outbreak is under control.
Norovirus is a winter bug which causes vomiting and diarrhoea.
A Facebook post by the Royal reads: "At the end of last week we explained that we were stretched in the hospital - due to cases of Norovirus in bays on several of our wards, meaning we couldn't admit patients to these areas, reducing our bed numbers and making it difficult to meet demand.
"Although we've done everything we can to try and prevent the spread of this highly contagious infection it's not reducing significantly or fast enough - so we're taking action to cut back on visiting hours. We're certainly not introducing a blanket ban - just asking people not to come unless it's between the hours of 2pm-4pm and 6pm-8pm. It will help us to do more to stop the spread in its tracks - with more cleaning and tidying possible when there are fewer people around."
The post adds: "Thank you to everyone that's already shown their support by staying away if they have any sort of diarrhoea or vomiting bug (you must be symptom free for 48 hours before you attend) and for ensuring that there are no more than two people at a patient's bedside. Please don't bring children with you to visit, especially if they are under 12 and remember - if you're not sure our staff have washed their hands when they're caring for you or a loved-one please ask.
"As always, if a patient is on end of life or palliative care please contact the ward and ask for advice and as soon as visiting is 'back to normal' we'll let you know."