Irrigation based on non‐compensated drip emitters is extremely common in agriculture, especially due to its simplicity, robustness and competitive cost. Nevertheless, because of friction losses in the pipe, together with irregular terrain, these systems often suffer from uneven water distribution in the drip emitters, which not only results in inefficient use of water resources but also might lead to inadequate irrigation in certain parts of the field. This work proposes to design the topology of the irrigation network to compensate for these discharge differences. To this end, a graph‐based mathematical model is developed to determine the discharge flows at different emitters for any network topology. This model is employed to formulate an integer nonlinear optimization problem, for which a messy genetic algorithm is proposed. The methodology is validated on an example problem, which is based on a rectangular agricultural crop of 49 fruit trees. The results revealed a 70% reduction in the coefficient of variation of the irrigation discharge rates, which was employed as a metric of irrigation uniformity. This caused a 75% reduction in the water excess. The results demonstrate that the uniformity can be improved simply by choosing a proper connectivity layout to build the pipe network.