Aim The aim of this study is to model the past, current and future distribution of J. phoenicea s.s., J. turbinata and J. canariensis, based on bioclimatic variables using a maximum entropy model (MaxEnt) in the Mediterranean and Macaronesian regions. Location Mediterranean and Macaronesian Taxon Cupressaceae, Juniperus Methods Data on the occurrence of the J. phoenicea complex was obtained from the GBIF, the literature, herbaria, and the authors’ field notes. The bioclimatic variables were obtained from the WorldClim database (http://worldclim.org/) and Paleoclim (http://www.paleoclim.org/). The climate data related to species localities were used for predictions of niches by implementation of MaxEnt and we evaluated the model with ENMeval. Results The potential niches of Juniperus phoenicea during the LIG, LGM and MH covered 30%, 10% and almost 100%, respectively, of the current potential niche. Climate warming could reduce potential niches by 30% and 90% in scenarios RCP2.6 and RCP8.5, respectively. The potential niches of Juniperus turbinata had a broad circum-Mediterranean and Canarian distribution during the LIG and the MH, extending its distribution during the LGM when it was found in more areas than at present; the predicted warming in scenario RCP2.6 and RCP8.5 could reduce the current potential niche by 30% and 50%, respectively. The model did not find suitable niches for J. canariensis during the LIG and the LGM, but during the MH its potential niche was 30% larger than at present. The climate warming scenario RCP2.6 indicates a reduction of the potential niche by 30%, while RCP8.5 does so by almost 60%. Main conclusions This research can provide information to increase the protection of the juniper forest and to try to counteract the phenomenon of local extinctions caused by anthropic pressure and climate changes.