The environment plays an important role in disease dynamics and in determining the health of individuals. Specifically, the built environment has a large impact on the prevention and containment of both chronic and infectious disease in humans and in non-human animals. The effects of the built environment on health can be direct, for example, by influencing environmental quality, or indirect by influencing behaviours that impact disease transmission and health. Furthermore, these impacts can happen at many scales, from the individual to the society, and from the design of the plates we eat from to the design of cities. In this paper, we review the ways that the built environment affects both the prevention and the containment of chronic and infectious disease. We bring examples from both human and animal societies and attempt to identify parallels and gaps between the study of humans and animals that can be capitalized on to advance the scope and perspective of research in each respective field. By consolidating this literature, we hope to highlight the importance of built structures in determining the complex dynamics of disease and in impacting the health behaviours of both humans and animals.This article is part of the theme issue 'Interdisciplinary approaches for uncovering the impacts of architecture on collective behaviour'.