The aryl hydrocarbon receptor (AhR) is a ligand-activated transcription factor involved in adaptive cell functions, and it is highly active in the epidermis. AhR ligands can accelerate keratinocyte differentiation, but the precise role of AhR in the skin barrier is unknown. Our study showed that transepidermal water loss, a parameter of skin barrier integrity, is high in AhR-deficient mice. Experiments with conditionally AhR-deficient mouse lines identified keratinocytes as the primary cell population responsible for high transepidermal water loss. Electron microscopy showed weaker intercellular connectivity in the epidermis of keratinocytes in AhR-knockout mice, and gene expression analysis identified many barrier-associated genes as AhR targets. Moreover, AhR-deficient mice had higher interindividual differences in their microbiome. Interestingly, removing AhR ligands from the diet of wild-type mice mimicked AhR deficiency with respect to the impaired barrier; conversely, re-addition of the plant-derived ligand indole-3-carbinol rescued the barrier deficiency even in aged mice. Our results suggest that functional AhR expression is critical for skin barrier integrity and that AhR represents a molecular target for the development of therapeutic approaches for skin barrier diseases, including by dietary intervention.