The degradation of perovskite solar cells in the presence of trace water and oxygen poses a challenge for their commercial impact given the appreciable permeability of cost-effective encapsulants. Point defects were recently shown to be a major source of decomposition due to their high affinity for water and oxygen molecules. Here, we report that, in single-cation/halide perovskites, local lattice strain facilitates the formation of vacancies and that cation/halide mixing suppresses their formation via strain relaxation. We then show that judiciously selected dopants can maximize the formation energy of defects responsible for degradation. Cd-containing cells show an order of magnitude enhanced unencapsulated stability compared to state-of-art mixed perovskite solar cells, for both shelf storage and maximum power point operation in ambient air at a relative humidity of 50%. We conclude by testing the generalizability of the defect engineering concept, demonstrating both vacancy-formation suppressors (such as Zn) and promoters (such as Hg).