Animals rely on chemosensory cues to survive in pathogen-rich environments. InC. elegans, pathogenic bacteria are known to trigger aversive behaviors through neuronal perception, and to activate molecular defenses throughout the animal. This suggests that neurons may be able to coordinate the activation of organism-wide defensive responses upon pathogen perception. We find that exposure to volatile pathogen-associated compounds induces cell non-autonomous activation of the endoplasmic reticulum unfolded protein response (UPR) in peripheral tissues followingxbp-1splicing in neurons. This odorant-induced UPR activation is dependent upon transforming growth factor beta (TGF-β) signaling and leads to extended lifespan and enhanced clearance of toxic proteins. Our data suggest that the cell non-autonomous UPR rewires organismal proteostasis in response to pathogen detection, pre-empting the arrival of proteotoxic stress. Thus, chemosensation of particular odors may be a novel way to manipulate stress responses and longevity.