A naval ensign is an ensign used by naval ships of various countries to denote their nationality. It can be the same or different from a country's civil ensign or state ensign.
Russian Project 775 landing ship Korolev. Note the Russian naval jack at the front and naval ensign at the rear.
The ensign is a maritime flag that is used for the national identification of a ship. The ensign is the largest flag, generally flown at the stern (rear) of the ship while in port. In ports, depending on the ship's origin, it is sometimes identical with a jack on the bow of the ship. Jacks are more common on warships than on merchant ships.
National civil ensign of New Zealand flown from the stern of Hikitia