because the Elizabeth River was hard to blockade, the Gosport Navy Yard was destroyed rather than defended three times
Source: Library of Congress, Southeastern part of Virginia, from York River, and west to Black Water River (1862)
In 1607, the Susan Constant, Discovery and Godspeed kept going past Hampton Roads. They sailed 60 or so miles upstream to Jamestown, following instructions prepared before the fleet left London in 1606. Christopher Newport may have considered the Elizabeth River to be a great shelter from storms and defensible against a single pirate ship, but he knew it could not be protected from a fleet of warships in an international conflict with Spain, France, or Holland.
In the 1660's, Dutch ships proved that point. They raided the tobacco fleet and other English vessels in the Chesapeake Bay. The Dutch were successful because the British Navy had not placed enough powrful "guardships" in the area to defend the colony.
The rebellious Virginians in 1779, the Yankees in 1861, and the Confederates in 1862 also recognized that military facilities along the Elizabeth River were not defensible. Cannon located on Craney Island, and in forts on either side of the river further upstream, could hit ships in the Elizabeth River, but those forts were difficult to protect against attack by land and sea.
In the Revolutionary War, Virginians erected land-based fortifications on Craney Island at the mouth of the Elizabeth River and built Fort Nelson on the west bank further upstream. Those quickly-built forts provided insufficient protection against the powerful British Navy and marines that could be landed from warships.
The British ships sailed past Craney Island in 1779 and captured Fort Nelson. The rebellious Americans then burned the Gosport Shipyard, abandoning Portsmouth and Norfolk rather than defending those cities.
British forces under General Leslie returned to Portsmouth again in 1780. Benedict Arnold re-occupied the town again in 1781, prior to his raid on Richmond. Later that year, Cornwallis brought his forces to Yorktown, but lacked an adequate naval presence to defend his base. The success of the French fleet at the Battle of the Capes demonstrated that a strong naval force could block an enemy from sailing into the Chesapeake Bay, and allow sufficent time for a siege to capture a well-fortified location.
In 1813, the American forces did manage to protect Portsmouth even though they lacked an effective navy in the area. The USS Constellation was at the shipyard, but was not able to sail out to engage the British. The USS Constellation would have been attacked before it could emerge from the narrow channel of the Elizabeth River and maneuver into position to return fire and defend itself.
The British attacked Craney Island, landing troops west of Craney Island at near Hoffler's Creek. Because they landed when the tide was too high to wade across the Thoroughfare, shelling from American artillery forced the British to retreat back to their ships. When British troops on barges launched an amphibious assault, the Craney Island cannon were able to hit the barges maeuvering through mudflats and force another retreat.
The British then chose to attack Hampton, a "softer" target without fortifications. Through the rest of the war, the British did blockade the Elizabeth River and keep the USS Constellation out of action in the War of 1812, but were not able to force destruction of the shipyard at Portsmouth.
The successful defense of Craney Island in 1813 showed that fortifications with adequate firepower and personnel could protect the naval facilities up the Elizabeth River at Portsmouth. Starting in 1819, Fort Calhoun was constructed on the Rip Rap Shoal near Fort Monroe. Twenty years of construction was required to convert the shoal into a platform from which cannon could fire across all river channels, and block an enemy fleet from sailing up the James River. After the start of the Civil War, Fort Calhoun was renamed Fort Wool.
Despite its construction, the Federal government knew in 1861 that it could not defend Gosport Navy Yard against the rebellious Virginians. There was no threat from a Confederate Navy at the time, but the shipyard was threatened by land attack. There were few troops and virtually no fortifications at the shipyard itself.
Gosport Navy Yard in 1861
Source: Library of Congress, Colton's new topographical map of the eastern portion of the state of North Carolina with part of Virginia & South Carolina (by Joseph H. Colton, 1861)
Virginia and Yankee commanders negotiated a deal that allowed for the shipyard to be evacuated without a fight. During the evacuation, the Yankees burned the shipyard and vessels there, including the USS Merrimack.
Union military forces burned the Gosport Navy Yard in 1861
Source: Library of Congress, Norfolk Navy Yard, after the rebels departure (by Alfred R. Waud, May 1862)
The Confederates controlled the shipyard for almost a year, giving them enough time to use the hull of the USS Merrimack to create an ironclad vessel christened the CSS Virginia. They enhanced the defenses at Craney Island, anticipating another attack at the mouth of the Elizabeth River.
Confederate fortifications on Craney Island in 1862
Source: NOAA Office of Coast Survey, Rebel Fortifications Craney Island Elizabeth River Virginia
A year later, the Confederates mimicked the "destroy-and-run" behavior of the Union forces.
At the start of the 1862 Peninsula Campaign, General George McClellan organized a massive military buildup at Fort Monroe. Ships would supply the US Army as it advanced up the peninsula between the James and York rivers. Those ships were threatened by the CSS Virginia based at the Gosport Navy Yard, despite the presence of the USS Monitor and a powerful fleet of wooden Union warships.
At the suggestion of President Lincoln, McClellan finally ordered an assault against Norfolk and Portsmouth to protect his supply line.
Once again, the forces occupying Norfolk and Portsmouth abandoned the cities and the shipyard. The Confederates recognized that their land-based defenses and troop numbers were inadequate to repel the attacking force. Union forces based at Fort Monroe were powerful enough to land at Willoughby Spit, seize Norfolk, and then cross the Elizabeth River.
The Confederates fled rather than fight. Once again, the facilities and vessels at the Gosport Navy Yard were destroyed. The CSS Virginia was taken out into the Elizabeth River and blown up.
during the Civil War, both the Federal and Confederate navies chose to destroy the shipyard
Source: Library of Congress, Ruins of Norfolk Navy Yard, Virginia (1864)
After the Spanish-American War, the United States fortified the entrance to the Chesapeake Bay, just as fortifications on Craney Island had been built to block enemy ships from sailing into the Elizabeth River. By the time of World War I, high-powered artillery on shore bases such as Fort Story could effectively block enemy ships from sailing into the Chesapeake Bay and threaten what had been renamed the Norfolk Navy Yard in 1862.
With the creation of the Norfolk Naval Base in World War I, the United States was able to provide adequate protection for the Norfolk Navy Yard with both naval and land-based forces.