For most women, sex is safe during pregnancy. The fetus is surrounded by amniotic fluid which acts as a cushion, so movement during sex shouldn’t cause injury. Also, a mucus plug covers the cervix, keeping bacteria out of the uterus.
However, there are times when sex may be risky. Women who are at risk for miscarriage or premature labor should probably not have sex. This is also the case for women who have unexplained vaginal bleeding or discharge, early cervical dilation, and leaking of amniotic fluid.
Women with placenta previa (when the placenta is low in the uterus and covers the cervix) should also avoid sex.
A woman concerned about sex during pregnancy should talk to her obstetrician.