San Francisco is infamous for having expensive homes, but it’s also famous for having important historic properties that have been dutifully preserved since 1850.

Meld your affinity for real estate, history, and San Francisco’s aestheticism by paying a visit to some of these architecturally fascinating estates. You can even spend the night at one if admiring them from afar isn’t satisfying enough.

Painted Ladies aside, here is a compilation of 6 properties in San Francisco that every history buff and real estate aficionado should visit.

Related: Homeownership Under $1M: 7 Cheapest San Francisco Neighborhoods

1. The Grateful Dead House

Photo: Tracie Ball, Flickr, Creative Commons

The Grateful Dead House, the dark brown Queen Anne house photographed above, lives true to its name: it’s the house where the Grateful Dead lived during the 1960s. Located in the Haight on 710 Ashbury Street, visiting this home is an absolute necessity for all Dead Heads and lovers of hippie history. Fair warning, this home is privately owned, so don’t go knocking for Jerry.

Related: Love It or Haight It: Haight Ashbury Neighborhood Guide

2. The Octagon House

Photo: Charles Dawson, Flickr, Creative Commons

The McElroy Octagon House, also known as the Colonial Dames Octagon House, is a historic property located at 2645 Gough Street. Built in 1861, this architectural treasure is a Colonial and Federal Periods Decorative Arts Museum. The museum and garden are open to the public from 12PM to 3PM on the 2nd Sunday and the 2nd and 4th Thursday of each month except January. Notably, it carries the shape of an octagon.

3. The Abner Phelps House

Photo: Dennis Brumm, Flickr, Creative Commons

Though the stories about this residence vary depending on the teller, the Abner Phelps house is considered to be the oldest unaltered residence in San Francisco, dating back to 1850. This Gothic Revival home was built by John Middleton & Sons, who was one of the first real estate “concerns” in the City. This house has changed locations a few times, but it is now settled at 1111 Oak Street.

4. The William Westerfeld House

Photo: Facebook

Nestled on the northwest corner of Alamo Square at 1198 Fulton Street, the eye-popping William Westerfeld House is San Francisco Landmark Number 135 and sure to grab the attention of the most distracted of passersby. The first owner of this House of Legends was William Westerfield, a German-born confectioner who arrived in San Francisco in the 1870s. He hired builder Henry Geilfuss to construct a modest 28-room mansion for his family of 6.  After Westerfeld died, John Mahony, who built St. Francis Hotel and the Palace Hotel, purchased and expanded the property. The current owner is Jim Siegel, who purchased the mansion in 1986 and has since retrofitted and upgraded the home.

Related: Views and Victorians: Things to Do in Alamo Square Park

5. The Chateau Tivoli

Photo: Bedandbreakfast.com, Pinterest

Residing in the Alamo Square Historic District at 1057 Steiner Street, Chateau Tivoli is not only a restored 1892 structure embedded with Victorian antiques, it’s a bed and breakfast! As such, if you really want to indulge your penchant for history, this property might be as close as you can get to time traveling.

6. The Haas-Lilienthal House

Photo: Edwardhblake, Flickr, Creative Commons

Plotted on 2007 Franklin Street, the Haas-Lilienthal House is the the only period era home open to the public in San Francisco. This traditional Queen Anne house exemplifies upper-middle class life in the Victorian era. Designed by German architect Peter R. Schmidt in 1886, this home was commissioned William Haas who was a Bavarian immigrant and considered a leader in the Jewish community. Built of redwood and fir, the house withstood both the 1906 and 1989 earthquakes with only minor damage, making it one of few existing landmarks to have survived the quake.