Were coastal defences ever built solely to protect against landing troops?
Short answerYes; much of the Atlantic Wall focused on beach denial, with separate batteries handling ships farther offshore.
NotesLarge parts of the Atlantic Wall were designed to deny beaches to landing troops rather than fight warships offshore. Heavy anti-ship batteries could cover wide sectors and therefore did not need to sit on every beach. Local weapons instead swept the landing areas themselves. The two Pak 43 positions at Omaha Beach illustrate the distinction because they were sited along the sand with little ability to fire out to sea.