Present-day Edinburgh was the location of Din Eidyn, a dun or hillfort associated with the kingdom of the Gododdin.[12] The modern Scottish Gaelic name "Dùn Eideann" derives directly from the British Din Eidyn; the English and Scots form are similar, adding the element -burgh, from the Old English burh, also meaning fort.[13] Some sources claim Edinburgh's name is derived from an Old English form such as Eadwinesburh, in reference to the 7th century king Edwin of Northumbria.[14] However, modern scholarship refutes this, as the form Eidyn predates Edwin.[13][15]
The first evidence of the existence of the town as a separate entity from the fort lies in an early 12th century royal charter, generally thought to date from 1124, by King David I granting land to the Church of the Holy Rood of Edinburgh. This suggests that the town came into official existence between 1018 (when King Malcolm II secured the Lothians from the Northumbrians) and 1124.By the 1170s King William the Lion was using the name "Edenesburch" in a charter (in Latin) confirming the 1124 grant of David I.