A sultanate that never stopped ruling, built around the two largest religious monuments Southeast Asia ever produced.

A kingdom that outlasted the empire that colonized it

Yogyakarta is the only place in Indonesia where a pre-colonial royal house still governs. Every other sultanate and kingdom that once ruled the archipelago was dissolved into the provincial system after independence in 1945 — their palaces became museums, their courts became ceremonial curiosities. Yogyakarta's Sultan did not step aside. Hamengkubuwono IX, the reigning Sultan at independence, threw his support and his treasury behind the fledgling Indonesian republic when the Dutch tried to retake the archipelago by force, and in return the new nation granted Yogyakarta a status no other region holds: a Special Region, governed by the Sultan as a hereditary right written into the region's own founding law rather than the national constitution.

The current Sultan, Hamengkubuwono X, is therefore both the ceremonial head of a four-century-old royal house and the elected-in-practice Governor of the province — a dual role with no equivalent anywhere else in the country. The Kraton, the walled palace complex at the city's center, is not a relic kept alive for tourists. Court musicians still rehearse gamelan in its pavilions, royal abdi dalem retainers still serve in traditional dress, and the Sultan's family still lives on the grounds. Visiting the Kraton means walking into a government building that also happens to be seven hundred years of continuous Javanese court culture, layered one reign on top of the last.

Two mountains of stone that predate the sultanate by nine centuries

Long before there was a Sultan, this stretch of central Java produced the two largest religious monuments in the Southern Hemisphere's hemisphere of influence — Borobudur and Prambanan — built within a few decades of each other by rival dynasties who, as far as anyone can tell, coexisted peacefully while building monuments to opposite religions almost within sight of one another.

Borobudur was buried under volcanic ash and jungle for the better part of a thousand years before anyone rediscovered what it was.

Borobudur, raised by the Buddhist Sailendra dynasty starting around 750 CE, is built as a single walkable mandala — nine stacked platforms of intricately carved stone that a pilgrim ascends in a spiral, reading two and a half kilometers of relief panels along the way that narrate the Buddha's life and the path to enlightenment. It was abandoned sometime in the 14th century, as the center of Javanese power shifted east and the population around it declined, and it disappeared under volcanic ash from nearby Merapi and centuries of jungle growth. It was essentially unknown to the outside world until 1814, when Thomas Stamford Raffles — the British colonial administrator who later founded Singapore — heard local rumors of a buried monument and sent a team to clear it. What they uncovered was, and remains, the largest Buddhist monument on Earth.

Prambanan, finished a few decades later by the Hindu Sanjaya dynasty, takes the opposite architectural approach: instead of one mountain to climb, it is a forest of individual spires, the tallest reaching 47 meters, dedicated to the Hindu trinity of Brahma, Vishnu and Shiva. Its reliefs tell the Ramayana in sequence around the base of the main temples, the same story still performed live as dance-drama on an open-air stage within sight of the ruins most evenings of the week. Both sites were damaged badly in a 2006 earthquake and both have been substantially restored since — Prambanan's central Shiva temple reopened to visitors only in 2012.

Batik, and why it is worth understanding before you buy any

Yogyakarta is one of two Javanese cities — Solo, an hour away by train, is the other — that anchor Indonesia's batik tradition, and UNESCO recognized Indonesian batik-making as an Intangible Cultural Heritage in 2009 largely on the strength of what survives in these two courts. Traditional Yogyakarta batik is applied with a canting, a small copper-tipped tool that draws hot wax onto cloth in patterns that resist dye, then dipped and redipped in successive colors, with the wax melted away only at the end. A single fine piece can take a batik artist weeks to complete. Court batik historically carried patterns reserved for royalty — certain geometric motifs could not legally be worn by commoners — and some of those restrictions linger as social convention even though they are no longer enforced.

This history is also exactly what the city's best-known scam trades on. Around Malioboro and the Kraton, it is common for a friendly stranger to strike up conversation and mention a "batik exhibition, students only, closing today" a few streets away. The gallery at the end of that walk sells ordinary batik at inflated prices, and the exhibition, despite the urgency, runs every day of the year. The tradition behind the pitch is completely real — that is precisely what makes the pitch effective.

Gudeg, and a city that named itself after a stew

Yogyakarta calls itself Kota Gudeg, the City of Gudeg, after a dish that takes most of a day to make correctly. Young jackfruit is simmered for hours in coconut milk and palm sugar until it turns dark brown and shreds apart, then served with rice, a boiled egg, shredded chicken, and krecek — a spicy beef-skin relish that cuts the stew's sweetness. The sweetness itself is a regional signature: Yogyakarta and its neighbor Solo both cook noticeably sweeter than the rest of Java, a palate difference locals will bring up unprompted.

The best-known gudeg stalls have been run by the same families, from the same spot, for three generations or more.

The dish is old enough that a version of it appears in Javanese court chronicles predating the modern city, and the families who run its most celebrated stalls today — clustered especially around Jalan Wijilan near the Kraton's eastern gate — trace their recipes back multiple generations. Gudeg is traditionally an all-day food, available from breakfast through a late-night version called gudeg krecek that street vendors sell into the early hours for a post-evening-out crowd, which tells you something about how central the dish is to the city's actual rhythm rather than just its tourist identity.

A street built for walking, and a city built around it

Malioboro Street runs in a straight line from Tugu — the white obelisk marking Yogyakarta's symbolic axis — down to the Kraton itself, and that alignment is not an accident of city planning. Javanese cosmology holds that a straight line connects Mount Merapi to the north, through Tugu, through the palace, down to the Indian Ocean to the south, binding the volcano's destructive power to the sea's, with the Sultan's court positioned at the balance point between them. Malioboro is the pedestrian spine of that axis, and it has functioned as the city's principal market street since the 18th century.

Today it is Yogyakarta's most crowded stretch of pavement most hours of the day — lined with batik stalls, street-food carts, becak pedicabs and horse-drawn andong carriages working the corridor for short hops. Neither runs a meter, so the fare gets negotiated in cash before boarding, and a driver will sometimes suggest a stop at a silver or batik shop partway through a ride that seemed unusually cheap. None of this makes Malioboro worth skipping. It makes it worth walking with eyes open, which is a fair description of Yogyakarta as a whole: a city that rewards attention and occasionally tests it.