The whale shark is an endangered species that usually feeds in coastal areas of highly productive seas such as the Gulf of California, Mexico. This study aims to describe the effect of sea surface temperature, chlorophyll a, bathymetry and slope on the habitat suitability of whale sharks in three important aggregation sites of the Gulf of California. A total of 2396 records of occurrence of whale sharks were obtained from international databases and scientific literature between 1996 and 2018. These records were used for the creation of a species distribution model using MaxEnt for each of the three aggregation sites. The concentration of chlorophyll a explained 71% of the habitat suitability, followed by bathymetry and slope with a combined 17%, and sea surface temperature constituting 10% of the model. Habitat suitability was related to areas where nontargeted fisheries may impact whale sharks through bycatch, entanglement and ship strikes. The implications for the conservation of whale sharks should be considered for management decisions in terms of marine protected areas, fishing refugees or bans, and other regulations regarding fisheries activities.