Both viral and bacterial infections can be treated at home. But you should know that treating them at a doctor's place will be better as they can help you diagnose and treat the condition.