In the Middle Ages, a settlement was founded at the location of the current city by the Van der Goude family, who built a fortified castle alongside the banks of the Gouwe River, from which the family and the city took its name.