Recycled rubber aggregates (RRA) and recycled glass aggregates (RGA) are sustainable alternatives to natural aggregates. However, the influences of RRA and RGA on the magnesium sulfate resistance of geopolymers remain unclear. Previous studies have focused on the influences of binder type and composition on magnesium sulfate resistance but have neglected the role of aggregates. This study bridges this gap and demonstrates the influences of RRA and RGA on the magnesium sulfate resistance of geopolymers. This study investigated the physical properties, mechanical properties and phases of FA and GBFS-based geopolymers containing 0:10 – 10:0 RRA and RGA after being exposed to 5 % MgSO4 solution for 90 days. The results showed that compared to 100 % RGA, the 90-day length and mass of 100 % RRA increased by 50.48 and 33.22 times, respectively, and the 90-day compressive, flexural and splitting tensile strengths of 100 % RRA decreased by 65 %, 43.28 % and 56.75 %, respectively. However, the changes in length and mass of 100 % RGA were very small, and the mechanical properties even slightly increased rather than decreased. RRA + RGA showed an interval performance between 100 % RRA and 100 % RGA. The different magnesium sulfate resistance of RRA and RGA were attributed to the following mechanisms. RRA caused much higher drying shrinkage of geopolymers than RGA because the soft nature of RRA increased uncoordinated deformation, leading to micro-cracks in the matrix before magnesium sulfate exposure. The pre-existing micro-cracks served as physical transportation paths for external ions to diffuse into the interior of specimens, leading to expansive gypsum crystals formed in these micro-cracks. The accumulation of expansive gypsum crystals enlarged these micro-cracks and facilitated their propagation, leading to the expansion, cracking and degraded mechanical properties. By contrast, RGA reduced drying shrinkage due to its hard nature, which limited the availability of micro-cracks as physical transportation paths for external ions and therefore reduced the formation of expansive gypsum crystals and improved the magnesium sulfate resistance of geopolymers.