Yester Castle is a ruined castle, located 1.5 miles (2.4 km) south east of the village of Gifford in East Lothian, Scotland. The only remaining structure is the subterranean Goblin Ha' or Hobgoblin Ha' (Goblin Hall). It is a Scheduled Ancient Monument, recorded as such by the Royal Commission on the Ancient and Historical Monuments of Scotland (RCAHMS). Originally known as Yestred (from the Brythonic Ystrad, meaning strath or dale), the barony of Yester was granted by King William the Lion to Hugo de Giffard, a Norman immigrant given land in East Lothian during the reign of King David I.
The original stone keep, built before 1267, is generally considered to be by Sir Hugo de Giffard. A grandson of the first Laird of Yester, he served as a guardian of the young Alexander III of Scotland, and was by repute a magician and necromancer. Alexander III is known to have been at Yester on and around May 24, 1278, where he corresponded with Edward I of England. Following the Scots Wars of Independence, Yester was rebuilt as a castle of enceinte.