With the launch of the highly successful Swift GRB mission 20 years ago came a step change in our understanding of GRBs in terms of their emission properties, their progenitors and their use as probes of star formation and the distant universe. In this talk I will focus on the use of the luminous, multi-wavelength afterglow to study the properties of the intervening attenuating dust and gas within the GRB host galaxy, and on how combing the afterglow absorption properties with host galaxy emission properties can further the potential of GRBs as unique probes of distant galaxies.