If you are pregnant, it’s important to take precautions against viral infections. A viral infection is a contagious illness. Most viruses will not hurt your baby. However, some viruses can cause miscarriage or birth defects. A virus can affect your respiratory tract (breathing) and can cause other symptoms. The flu and the common cold are examples of viral infections.