The growing interest to the application of perovskite solar cells (PSC) in aerospace requires great attention to the design of new absorber materials with enhanced photostability and radiation hardness. We addressed this challenge through the B-site engineering by partial replacing of Pb2+ in the complex halides with Ca2+, Sr2+, and Ba2+. Change in the material electronic properties suggests the incorporation of the substituent cations in the perovskite lattice. However, when the loading of alkaline earth halides is high, they tend to segregate to the film surface and grain boundaries. The modification of MAPbI3 and Cs0.12FA0.88PbI3 by replacing a 1% of Pb2+ with alkaline earth metal cations resulted in improvements in the photostability and radiation hardness under exposure to gamma rays and electrons beam. Depending on the material formulation, it was possible to mitigate the photochemical and radiation-induced Pb0 formation and the univalent cation phase segregation. The best of the designed perovskite absorbers could successfully tolerate high doses of gamma rays (5.5 MGy) and electron fluences (3 × 1016 e/cm2), thus outperforming significantly the non-modified material. These findings feature the incorporation of alkaline earth metal cations as a promising approach for the development of PSC with enhanced radiation hardness for aerospace applications.