German submarine U-317

German submarine U-317 was a Type VIIC/41 U-boat of the Nazi German Kriegsmarine during World War II.

The submarine was laid down on 12 September 1942 at the Flender Werke at Lübeck, launched on 1 September 1943, and commissioned on 23 October 1943 under the command of Oberleutnant zur See Peter Rahlf.

Service history
 U-317 served with the 4th U-boat Flotilla for training, and later with the 9th U-boat Flotilla in front-line service from 1 to 26 June 1944.

U-317's first patrol took her from Kiel in Germany to Egersund in Norway, between 31 May and 2 June 1944. She then sailed from Egersund on 21 June for her second and final patrol.

U-317 was sunk with all hands on 26 June 1944, northeast of the Shetland islands, in position 62.05°N, 1.75°W, by depth charges dropped by a Liberator anti-submarine bomber of No. 86 Squadron RAF.