The main goal of this study was to test the capability of irrigation water‐based and soil‐based approaches to control nitrate and chloride mass fluxes and concentrations below the root zone of agricultural fields irrigated with treated waste water (TWW). Using numerical simulations of flow and transport in relatively a fine‐textured, unsaturated, spatially heterogeneous, flow domain, scenarios examined include: (i) irrigating with TWW only (REF); (ii) irrigation water is substituted between TWW and desalinized water (ADW); (iii) soil includes a capillary barrier (CB) and irrigating with TWW only (CB + TWW); and (iv) combination of (ii) and a CB (CB + ADW). Considering groundwater quality protection, plausible goals are: (i) to minimize solute discharges leaving the root zone, and, (ii) to maximize the probability that solute concentrations leaving the root zone will not exceed a prescribed, critical value. Results of the analyses suggest that in the case of a seasonal crop (a corn field) subject to irrigations only, with respect to the first goal, the CB + TWW and CB + ADW scenarios provide similar, excellent results, better than the ADW scenario; with respect to the second goal, however, the CB + ADW scenario gave substantially better results than the CB + TWW scenario. In the case a multiyear, perennial crop (a citrus orchard), subject to a sequence of irrigation and rainfall periods, for both solutes, and, particularly, nitrate, with respect to the two goals, both the ADW and CB + ADW scenarios perform better than the CB + TWW scenario. As compared with the REF and CB + TWW scenarios, the ADW and CB + ADW scenarios substantially reduce nitrogen mass fluxes to the groundwater and to the atmosphere, and, essentially, did not reduce nitrogen mass fluxes to the trees. Similar results, even better, were demonstrated for a relatively coarse‐textured, spatially heterogeneous soil.