Porthmadog came into existence after William Madocks built a long seawall, called the Cob, to reclaim a large proportion of the Traeth Mawr from the sea for agricultural use.
This was to become part of a rail link across mid-Wales to Porth Dinllaen (now owned by the National Trust) on the Lleyn Peninsula which he hoped would become the main port for Dublin from London and the south of England. At that time the Menai Strait and the River Conwy were not bridged, but later his rivals succeeded in promoting the North Wales coast route and Holyhead became the principal port for Ireland.
In the autumn of 1811 the embankment (Cob) was finished. It had taken longer and cost more than anticipated, and Madocks’ creditors were pressing for payment. Now, an end to the financial worries seemed assured, with a toll from foot passengers and carriages, and the income from the reclaimed land. A four day feast and Eisteddfod was held to celebrate the Cob's completion.
Then in February 1812 high tides and a storm breached it. Madocks' agent and supporters held the creditors at bay, drummed up men and money from all around the county and finally repaired the breach and strengthened the whole embankment. By 1814 it was open again.