The Royal Palace of La Granja de San Ildefonso (Spanish: Palacio Real de La Granja de San Ildefonso), known as La Granja, is an early 18th-century palace in the small town of San Ildefonso, located in the hills near Segovia and 80 kilometers north of Madrid, within the Province of Segovia in central Spain.