Dublin Castle is situated in the very heart of historic Dublin. In fact the city gets its name from the Dubh Linn or Black Pool (dubh = black), on the site of the present Castle Gardens and Coach House.
The Castle stands on the high ridge, the highest ground in the locality, at the junction of the River Liffey and its tributary the (now underground) Poddle, which formed a natural boundary on two sides. It is very probable that the original fortification on this easily defended strategic site was a Gaelic Ringfort, which guarded the harbour, the adjacent Dubhlinn Ecclesiastical Centre and the four long distant roads that converged nearby.
Neither the Irish nor the Vikings could withstand the Norman invasion of 1169. The Vikings were ejected and the Normans became the next occupiers of Dublin. They strengthened and expanded the existing town walls. It is assumed that their first fortification was an earth and wooden, motte and bailey, on the site of present day Dublin Castle. There is archaeological evidence of a wooden and stone castle there in the 1170's.
In August 1204, King John of England commanded the erection of a larger strong castle, with strong walls and good ditches, for the defence of the city, administration of justice and safe custody of treasure. It was completed by 1230 and the Great Courtyard (Upper Castle Yard) of today corresponds closely with the fortification.