Yes, in order to prevent infection-related risks to the mother's and the unborn child's serious health, it is essential to test for and treat STDs in pregnant women. The earlier you begin prenatal care, the better the outcomes will be for your health and the health of your unborn child.