It's somewhat difficult to prevent a newborn child with an infected mother from getting the disease.
In any case, within prenatal care there are tests for this infection because of the great risks to the life of the newborn.
If the pregnant woman develops symptoms similar to genital herpes (or has suffered it before) is recommended cesarean delivery, to prevent the newborn has direct contact with the female genital organs.
In addition, this group of patients (pregnant women) can receive treatment with antiviral drugs from the 36th week of gestation.
Before this period, there is a risk of fetal damage.
That is not recommended. However, the treating physician will be responsible for giving specific instructions for the patient to have sex with a decreased risk of transmissibility.