Yogyakarta Palace was built by Prince Mangkubumi in 1755-1756 (Javanese year: 1682), several months after the signing of the Treaty of Giyanti between Prince Mangkubumi of Yogyakarta, Hamengkubuwono of Surakarta and Dutch East India Company. A Banyan Forest was chosen as the site of the palace due to its location between two rivers which were considered good protection from possible flooding.
On 20 June 1812, Stamford Raffles led a 1,200-strong British force to attack the walled royal city of Yogyakarta. The Javanese, although outnumbering the invader, weren't prepared for the attack and were taken back by the event. In one day the city of Yogyakarta fell and the royal palace was sacked and burned. The total loot from the palace valued £15,000 in gold, jewels and hard currency (which values £500,000 today). The event was the first time an attack has been carried out into a court in Java and as a result the sultanate was completely subjugated to colonial authority.
Most of the palace's current form are built by Sultan Hamengkubuwono VIII who reign from 1921 to 1939. It suffered from an earthquake in 1876 and 2006, and was subsequently rebuilt after the devastation.
The chief architect of this palace is Sultan Hamengkubuwono I, the founder of Yogyakarta Sultanate. His expertise in architecture was appreciated by the Dutch scientist Theodoor Gautier Thomas Pigeaud and Lucien Adam who regarded him as the "architect" of the brother of Pakubuwono II Surakarta Sunanate. The basic building and basic design of the palace layout following the basic design of the old city landscape of Yogyakarta was completed between 1755 -1756.Another building was later added by the later Sultan of Yogyakarta.The present form of palace is largely the result of restoration and restoration by Sultan Hamengkubuwono VIII (reigned 1921-1939).
Kraton means the place where the "Ratu" (in English: Queen, in Javanese also mean: King) resides. The word "Keraton" (Keraton is living quarter of the royal family in the palace) (shortened form of ratu/Ka-ratuan) derived from the word "Ratu" which in Malay means king. The palace was built according to Javanese Philosophy and is shrouded by mysticism. The spatial arrangement of the palace, including the cityscape of the old city of Yogyakarta, including its architecture, direction of buildings, and objects all belongs to the mythological value and belief system of the Javanese. The main street of the old city forms a straight line from Tugu Yogyakarta, Kraton, Mount Merapi to Krapyak Hunting House. The layout mean "the origin of human beings and their last purposes" (Javanese: sangkan paraning dumadi).
The road from Krapyak Hunting House to the palace symbolizes the first creation of men stage to adulthood. The villages surrounding Krapyak Hunting House are named "Mijen" from the word Wiji (seed). Along the way Tamarind and Spanish cherry trees are planted to represent the journey from childhood to adulthood. It then goes to Tugu Yogyakarta and finally ends at the palace, meaning the end of human life and meeting the Creator. And finally the seven gates of Gladhag to Donopratopo means the seven step to Heaven.
Tugu Yogyakarta (Gilig golong monument) located on the north side of the old city is a symbol of "unification between the king (golong) and the people (gilig)" (Javanese: manunggaling kawulo gusti). It also symbolizes the final unity of the creator (Khalik) and His subjects. Gate Donopratoro (Gate to Kedaton quarter) means "a good person is someone who is generous and knows how to control his lust" and the two Dwarapala statues, named Balabuta and Cinkarabala, each represent good and evil. The palace's magical artifacts are believed to have the power to repulse evil intention.