In naval architecture, a taffrail is the handrail around the open deck area toward the stern of a ship or boat. The rear deck of a ship is often called the afterdeck or poop deck. Not all ships have an afterdeck or poop deck. Sometimes taffrail refers to just the curved wooden top of the stern of a sailing man-of-war or East Indiaman ship. The rails of these wooden sailing ships usually had hand-carved wooden rails, often highly decorated. Sometimes taffrail refers to the complete deck area at the stern of a vessel.
A taffrail should not be confused with a pushpit, which is a common name for the tubular protection rail running around the stern of a small yacht.
A taffrail log is a mechanical speed logging device, used like a car odometer. The taffrail log was towed from the stern or taffrail of the ship by a long line. Taffrail log were developed in the eighteenth century and became a practical device in the nineteenth century. 
William Heysmann Overend painting: Naval Captain on the Poop deck taffrail
Weather deck of the Swedish 17th-century warship Vasa looking aft toward the sterncastle, with a hand carved taffrail
Gdańsk "Lew" a seventeenth century galleon replica, stern with wooden carved taffrail
Prins Willem stern with wooden carved taffrail
Star of India stern taffrail