2,123. Ritual Impurity from Childbirth

Hilchos Issurei Biah 9:39

Regarding women who have been rendered unclean by stains: if the woman found the stain during her niddah days, she must consider herself a niddah out of doubt. She remains so for seven days and immerses in a mikvah on the eighth night, after which she is permitted to her husband. If she found the stain during her zivah days, she must consider herself a minor or major zavah as appropriate because of the doubt. She remains so for one day if a minor zavah or counts seven clean days if a major zavah. This comes from a rabbinic enactment as has already been discussed. Therefore, if a man is intentionally intimate with such a woman, he is given lashes for acting rebelliously and does not have to bring an offering.

Hilchos Issurei Biah 10:1

After giving birth, a woman is ritually impure like a niddah, even if she didn’t see blood. This is the case regardless of whether she delivered a living child, one that was stillborn, or even a miscarriage. If the child is a boy, she observes the number of days appropriate for a boy (i.e., seven); if a girl, she observes the number of days appropriate for a girl (i.e., 14). This is only the case provided that the fetus was fully formed, which is never the case in under 40 days for either a boy or a girl.