This Halacha is an excerpt from our Sefer
Buy me here or on Amazon.com
May a pregnant woman visit a cemetery?
From the letter of the law, it is permitted for a pregnant woman to enter a cemetery. However, many women are accustomed not to visit a cemetery when they are pregnant. Those that have received such a custom are to abide by it. However, it is permitted for them to visit the grave of a Tzaddik or the grave of a loved one on the day of the Yartzite and the like. Many women are lenient in all cases, as is the letter of the law.
The wife of a Kohen: It is permitted for the pregnant wife of a Kohen to enter a cemetery. Nonetheless, some Poskim rule it is proper to be stringent not to do so [even on a Yartzite or by Kivrei Tzaddikim]. This especially applies if she knows that the gender of the child is male or she is at the end of her term and is ready for birth. Nevertheless, even in such a case, most Poskim rule it is allowed from the letter of the law.
 Minchas Yitzchak 10:42; Nitei Gavriel Aveilus 2:84-4
 Pashut as there is no source for forbidding it, and so is proved from the fact the Poskim [below] bring that even the wife of a Kohen that is pregnant may enter a cemetery, and as writes the Kneses Hagedola [brought in Birkeiy Yosef 343/4] that even by the pregnant wife of a Kohen those who are stringent are doing Minhag Borus [custom of ignorance], hence certainly the wife of a Yisrael is allowed.
 This custom has no known source. A number of possible reasons are suggested: 1) Perhaps this is due to the fact that it is proper for the pregnant wife of a Kohen to avoid a cemetery, and hence we see that the fetus can receive impurity. Now since we await the rebuilding of the Temple every day the women avoid going to a cemetery, as if the Temple is rebuilt while they are still pregnant they will be able to give over their pure sons to perform the necessary actions required for the Para Aduma. [Minchas Yitzchak ibid; See Parah Mishneh 3/2] 2) Alternatively, it is because they desire to avoid any impurity during the pregnancy. [Nitei Gavriel ibid; See Sheivet Hamussar 24]
 Poskim ibid based on Rashba that we do not differ a tradition received from righteous women even if we have 600,000 proofs against it. [brought in Heishiv Moshe 13]
 Nitei Gavriel ibid
 Heard from Rav Asher Lemel HaCohen
 Rokeiach 366; Shach 371/1; M”A 343/2; Kneses Hagedola [brought in Birkeiy Yosef 343/4-there he writes it’s a Minhag Borus to be stringent] Derech Hachaim; Chochmas Adam 160/1; Kitzur SHU”A 202/15; M”B 343/3; See Pischeiy Teshuvah 371/1; Gilyon Maharsha 371; Darkei Chesed p. 208
The reason: As there is a Safek Sfeka; perhaps the fetus is a female and perhaps it will be a stillborn. [Rokeiach ibid] Alternatively a fetus cannot receive impurity as it is considered within a Beis Hablia. [M”A ibid; Ridbaz 200, brought in Shaareiy Teshuvah 371/1; See there that even the Rokeiach agrees to this.] Others however argue that a fetus is considered part of the mother [Yerech Imo] and hence can contract impurity even during pregnancy. [Birkeiy Yosef 343/1]
 Birkeiy Yosef 343/4; Kaf Hachaim 343/4; Minchas Yitzchak 1042
The reason: As if in truth the child is a boy he contracts impurity. [This is proven from fact the Rokeiach only allows it due to Safek Sfeika. See previous footnote for the dispute regarding Beis Hablia] Hence, it is proper to initially avoid doing so. [ibid]
 As then there is no longer a Sfek Sfeka according to the Rokeiach [as learns Birkeiy Yosef ibid], although according to many Poskim this would still remain permitted being that the fetus is considered within a Beis Hablia, as brought from M”A ibid; Ridbaz ibid and so is evident from other Poskim mentioned in next footnote] See Even Yisrael 8/77 that deals with this question in regards to giving birth in a hospital that is not careful about Tumas Meis. He concludes there that ultrasounds are not 100% accurate, and that it is for the needs of a Yoledes who is in Sakana and hence she may choose to go to whatever hospital she wishes. Nevertheless, she is not initially to take an ultrasound and hence remove the Sfek Sfeka. This is all with regards to which hospital to give birth and does not relate to a pregnant woman entering a Beis Hakevaros if she knows the child is male. It is understood that in such a case there are more Poskim who rule stringently.
 Sheilas Yaavetz 2/174 forbids in such a case [as the child may be born]; opinion in Darkei Chesed p. 208; Most Poskim however permit even in such a case, as the Sfek Sfeika still remains. [M”B 343/3; Radbaz ibid brought in Pischeiy Teshuvah ibid, that this was the original case of allowance written by the Rokeaich; Betzeil Hachochmah 3/105]
 See previous footnotes; and so ruled to me Harav Asher Lemel Cohen that practically it is not accustomed to be stringent.