Water heater comprising: a gas burner being configured to combust gas if a heat demand is present, namely if heated water is requested by at least one water consumer, a heat exchanger being configured to heat water using the thermal energy provided with the combustion of the gas, wherein the heat exchanger is a condensing heat exchanger, an input pipe being configured to provide water to be heated to the heat exchanger, an output pipe being configured to provide water heated by the heat exchanger to the at least one water consumer, a siphon or trap being configured to collect condensate resulting at the condensing heat exchanger during operation of the water heater, a first connection pipe and a valve (23, 25, 27) acting together with the first connection pipe, both the first connection pipe and the valve (23, 25, 27) being configured to guide water heated by heat exchanger from the output pipe to the siphon or trap, and/or guide water not heated by the heat exchanger from the output pipe to the siphon or trap, characterized by a second connecting pipe extending between the input pipe and the output pipe, wherein in a first alternative a separate valve acts together with the second connection pipe being configured to guide water from input pipe to the output pipe, or wherein in a second alternative the first connecting pipe extends between the second connecting pipe and the siphon or trap, the valve acting together with the first connection pipe is provided by a 3-way-valve, is connected between the first connecting pipe and the second connecting pipe and acts also together with the second connection pipe, a first port of the 3-way-valve is connected to the output pipe through a first section of the second connecting pipe, a second port of the 3-way-valve is connected to the input pipe through a second section of the second connecting pipe, and a third port of the 3-way-valve is connected to the siphon or trap through the first connecting pipe. a gas burner being configured to combust gas if a heat demand is present, namely if heated water is requested by at least one water consumer, a heat exchanger being configured to heat water using the thermal energy provided with the combustion of the gas, wherein the heat exchanger is a condensing heat exchanger, an input pipe being configured to provide water to be heated to the heat exchanger, an output pipe being configured to provide water heated by the heat exchanger to the at least one water consumer, a siphon or trap being configured to collect condensate resulting at the condensing heat exchanger during operation of the water heater, a first connection pipe and a valve (23, 25, 27) acting together with the first connection pipe, both the first connection pipe and the valve (23, 25, 27) being configured to guide water heated by heat exchanger from the output pipe to the siphon or trap, and/or guide water not heated by the heat exchanger from the output pipe to the siphon or trap, guide water heated by heat exchanger from the output pipe to the siphon or trap, and/or guide water not heated by the heat exchanger from the output pipe to the siphon or trap, characterized by a second connecting pipe extending between the input pipe and the output pipe, wherein in a first alternative a separate valve acts together with the second connection pipe being configured to guide water from input pipe to the output pipe, or wherein in a second alternative the first connecting pipe extends between the second connecting pipe and the siphon or trap, the valve acting together with the first connection pipe is provided by a 3-way-valve, is connected between the first connecting pipe and the second connecting pipe and acts also together with the second connection pipe, a first port of the 3-way-valve is connected to the output pipe through a first section of the second connecting pipe, a second port of the 3-way-valve is connected to the input pipe through a second section of the second connecting pipe, and a third port of the 3-way-valve is connected to the siphon or trap through the first connecting pipe. wherein in a first alternative a separate valve acts together with the second connection pipe being configured to guide water from input pipe to the output pipe, or wherein in a second alternative the first connecting pipe extends between the second connecting pipe and the siphon or trap, the valve acting together with the first connection pipe is provided by a 3-way-valve, is connected between the first connecting pipe and the second connecting pipe and acts also together with the second connection pipe, a first port of the 3-way-valve is connected to the output pipe through a first section of the second connecting pipe, a second port of the 3-way-valve is connected to the input pipe through a second section of the second connecting pipe, and a third port of the 3-way-valve is connected to the siphon or trap through the first connecting pipe.