Although it's rare, pregnant women can pass on the herpes infection to their child. This can result in a serious and sometimes deadly infection in the baby. That's why taking steps to prevent an outbreak at time of delivery is recommended starting at 34 weeks into the pregnancy. If you have signs of an active viral infection when it's time to deliver, your doctor will likely recommend a cesarean section for delivery.
The risk of transmission from mother to baby is highest if the mother becomes infected around the time of delivery (30% to 60%),[54][55] since insufficient time will have occurred for the generation and transfer of protective maternal antibodies before the birth of the child. In contrast, the risk falls to 3% if the infection is recurrent,[56] and is 1–3% if the woman is seropositive for both HSV-1 and HSV-2,[56][57] and is less than 1% if no lesions are visible.[56] Women seropositive for only one type of HSV are only half as likely to transmit HSV as infected seronegative mothers. To prevent neonatal infections, seronegative women are recommended to avoid unprotected oral-genital contact with an HSV-1-seropositive partner and conventional sex with a partner having a genital infection during the last trimester of pregnancy. Mothers infected with HSV are advised to avoid procedures that would cause trauma to the infant during birth (e.g. fetal scalp electrodes, forceps, and vacuum extractors) and, should lesions be present, to elect caesarean section to reduce exposure of the child to infected secretions in the birth canal.[14] The use of antiviral treatments, such as aciclovir, given from the 36th week of pregnancy, limits HSV recurrence and shedding during childbirth, thereby reducing the need for caesarean section.[14]

'Using condoms or dams can help to protect against STIs, but herpes can also be passed on by skin-to-skin contact with the affected area, so it’s strongly recommended that you don’t have sex during this time,' she adds. 'This includes direct genital contact or skin-to-skin contact with the affected area, and doesn’t have to be penetrative sex,' says O’Sullivan.