Minecraft wiki entry for Door-based_iron_golem_farming, associated text: 11. Build 4 blocks out from the bottom of the tower and 3 blocks up on each side, then place 2 blocks at the end of it to keep the golems from escaping.