Different components of water footprint (WF) (green, blue, grey and white) and WF volume (WFV) were estimated for three main cereal crops in Iran (wheat, barley and maize) in the main cereal‐producing provinces. In order to classify the selected provinces according to their corresponding WFVs, hierarchical cluster analysis (HCA) was applied for clustering the WFV of maize, barley and wheat in irrigated and rainfed conditions. Then, the linear programming (LP) technique was used to determine the optimal cultivated area for cereals in order to minimize the total national WFV in irrigated and rainfed lands. The WFV of wheat, barley and maize production in irrigated lands were estimated to be 25 100, 5980 and 4610 Mm3 yr−1, respectively, under the current practice. The optimized values of WFV under irrigated conditions were 877, 338 and 374 Mm3 yr−1 lower than the current values, implying nearly 3.5, 5.7 and 8.1% achievable reductions. The reduction in rainfed lands was estimated to be 332 Mm3 yr−1 or 2.9% for wheat (from 11 300 to 11 000 Mm3 year−1) and 338 Mm3 yr−1 or 5.7% for barley (from 5950 to 5610 Mm3 yr−1). The results show that by optimizing the cultivated area of the main cereals in Iran, 2,210 Mm3 yr−1 or 4.5% of the national WFV could be saved. © 2019 John Wiley & Sons, Ltd.