The objective of this paper is to investigate the optimality of EMU fiscal rules from a welfare perspective. We compute welfare-maximizing feedback coefficients for monetary and fiscal rules in a NK-DSGE with a high number of nominal and real distortions, calibrated on the Euro-area data. The framework includes imperfect competition, costly capital accumulation, consumption habits, price and wage stickiness, distortionary taxation on consumption, labor and capital income. Fiscal policy responds, alternatively, to total deficit, total government liabilities, and a linear combination of both targets. We show that the liabilities rule is welfare superior, but it does not provide enough output stabilization if not coupled with a non-zero response of monetary policy to output; optimal feedback coefficient are larger under debt targeting rather than deficit; under the current specification, a SGP-like rule seems highly suboptimal.