District Heating (DH) is an efficient way to provide heat to residential users since it can allow recuperation of waste heat or can be coupled with cogenerative plants and very efficient boilers, achieving overall energy savings and thus allowing reductions in the system’s global emissions. Notwithstanding all of these benefits, the question if DH is to be preferred to other solutions, such as micro-cogenerative plants or conventional boilers feeding single or small groups of buildings, has its answer not only in technical and environmental evaluations, but also in economical ones, involving the district heating network (DHN) as a determinant parameter, being largely the most important investment. An important problem to be solved when planning a district heating system in a municipality is the extension of the network, which does not necessarily involve the whole town. The determination of optimal configuration, formulated as a synthesis problem, should allow one to decide which areas could be effectively and conveniently fed trough the DHN and which ones through distributed systems. Such design criterion should be always formulated as a first step of the decisional project, since, once the main network is designed, further developments are technically difficult or even impossible if not planned. In this paper thermoeconomic analysis is used as the key-factor for the system synthesis. This procedure does not guarantee to obtain the true optimal network structure; nevertheless a quasi-optimal configuration is always determined. In this case, the result can be improved by coupling this approach with other optimization algorithms, which increases the probability of reaching the true optimum. The use of the thermoeconomic approach (although combined with other optimization algorithms) reduces sensibly the computational efforts with respect to the direct application of other optimization procedures. In case of large systems, where the number of possible structures is extremely large, the use of this procedure is a strategy to make the problem resolvable. The theoretical developments are here applied to the town of Turin, where a district heating network operates. The optimal network is determined and compared with the existing one.