Hypothalamic–pituitary–adrenocortical (HPA) regulation in adults is influenced by early psychosocial adversity, but the role of infectious disease history is poorly understood. We studied the association between cumulative pathogen burden and cortisol profile over the day in a sample of 317 healthy men and women aged 51–72 years. Cumulative pathogen burden was defined as positive serostatus for Chlamydia pneumoniae, cytomegalovirus (CMV) and herpes simplex virus 1 (HSV-1). Salivary cortisol was sampled repeatedly over the day. The cortisol slope was defined as the decrease across the day and evening. Age, gender, grade of employment, body mass index, smoking status, self-rated health, cardiovascular medication, depressed mood and time of waking were included as covariates. The pathogen burden averaged 1·76 (s.d.=0·92). The cortisol slope was inversely associated with pathogen burden after controlling for covariates. When individual pathogens were studied, only CMV was associated with flatter cortisol rhythms in isolation. We conclude that pathogen burden is independently associated with flatter cortisol slopes over the day, and may contribute to disturbed neuroendocrine regulation.