Immunity is known to persist after vaccination for varicella zoster virus, but the duration of immunity in patients who develop herpes zoster (HZ) remains unknown. To investigate the association between a past history of HZ and its occurrence in the general population. The Shozu HZ (SHEZ) cohort study included data for 12 299 individuals aged ≥50 years with information on their HZ history. Cross‐sectional and 3‐year follow‐up studies were carried out to analyze the associations between a history of HZ (yes <10 years, yes ≥10 years, no) and the proportion of positive varicella zoster virus skin test results (erythema diameter ≥5 mm) and the risk of HZ after adjusting for potential confounding factors including age, sex, body mass index, smoking status, sleep duration, and mental stress. The incidences of positive skin test results were 87.7% (470/536) for individuals with a history of HZ <10 years ago, 82.2% (396/482) for those with a history of HZ ≥10 years, and 80.2% (3614/4509) for those with no history of HZ. The multivariable odds ratios (95% confidence intervals) of erythema diameter ≥5 mm were 2.07 (1.57–2.73) and 1. 39 (1.08–1.80) for individuals with a history <10 years and ≥10 years ago, respectively, compared with no history. The corresponding multivariable hazard ratios of HZ were 0.54 (0.34–0.85) and 1.16 (0.83–1.61), respectively. A past history of HZ <10 years ago may reduce the occurrence of HZ.