If you are pregnant and have hepatitis B, make sure your newborn gets the first dose of the hepatitis B vaccine and a shot of hepatitis B immune globulin, or HBIG, in the delivery room to prevent the baby from developing a chronic infection.