Most people buying a house in the Bay Area have steeled themselves against the inevitable sticker shock. But for some, a second, uglier surprise lurks in the paperwork that accompanies their new purchase: a rule that says you must be white to live there.

In the 1930s and 1940s, it was common practice for developers across the country to bar certain races from moving into their newly built homes — a discriminatory practice that also made its mark in the Bay Area.

While those rules can no longer be enforced, they can’t be entirely erased either, so they remain on the books in neighborhoods from the Oakland Hills to Redwood City and beyond. They’re a rare but jarring reminder of the progressive region’s painful history of discrimination.

“I was shocked. … I wouldn’t even be able to buy the property if that was still in place,” said Yan Heim, a Chinese-American real estate agent who was forced to sign such a provision when she bought her Orinda home in 2012.

Such bans are usually found among the “covenants, conditions and restrictions” listed in a home’s preliminary title report, which a buyer is asked to sign once his or her offer is accepted. A 1939 Redwood City home recently put up for sale, for example, includes a rule stating “no person of any race other than the Caucasian or white race” may use or occupy the property, with the exception of “domestic servants of a different race domiciled with an owner or tenant.” That prohibition is sandwiched between rules forbidding the owner from engaging in “noxious or offensive activity” on the property, keeping excessive numbers of “fowl, rabbits, or other creatures” or erecting a trailer, tent or shack to sleep in.

Other covenants from that era specifically prohibit residents of “African, Mongolian or Japanese” descent.

“It was a very powerful disincentive for African-Americans to buy homes in white neighborhoods, because a white home owner who sold a home to an African-American ran the risks of a lawsuit,” said Richard Rothstein, author of “The Color of Law,” which explores the racial history of segregation.

And those discriminatory rules were enforced. Rothstein’s book tells the story of African-American physician DeWitt Buckingham, who bought a house in Berkeley’s Claremont neighborhood from a white friend in 1945. A local neighborhood association sued, citing the covenant restricting the area to those of “pure Caucasian blood.” A state court ordered Buckingham to move out. But three years later, the Supreme Court forbid enforcement of racially restrictive covenants, and Buckingham was allowed to stay. Now such rules are prohibited by federal and state fair housing laws.

Racially restrictive covenants — along with discriminatory zoning laws and other practices — contributed to the lasting wealth gap between whites and people of color in the Bay Area and beyond, experts say. As minority families were excluded from the housing market, they were prevented from building home equity, often a stepping stone to wealth that can be passed down over generations. In San Jose, for example, 62 percent of white households owned their homes in 2017, according to the latest Census data available. That compares with 41 percent of Hispanic households and 33 percent of African-American households.

Bay Area real estate agents say discriminatory covenants are relatively rare today — they see them once every few years. After the initial shock wears off, most buyers simply ignore them. But for some, the language is a deal-breaker.

Realtor Kerri Naslund-Monday remembers working with an African-American family several years ago that was so offended by the whites-only provision attached to an Oakland house they wanted to buy that the family decided to walk away.

Most racial covenants come with a disclaimer saying they are void, a requirement of state law. In 2000, California set up a process for homeowners who want to go a step further, allowing them to add a document to their file with the racial language stricken out. That redacted document sits on top of the original, but does not replace it, so a record of the language remains.

A similar law went into effect in Washington state this year, after the University of Washington found more than 20,000 properties in the Seattle area with racial covenants, the Seattle Times reported.

A few homeowners are taking a stand by striking out the racial covenants in their property documents. For years, 38-year-old Eileen Bissen has been upset that the Concord home she bought with her husband in 2010 contains a covenant barring residency by “persons not wholly of the white Caucasian race.” Last month, she decided to do something about it.

Bissen headed to the Contra Costa County Clerk-Recorder’s office and filled out the paperwork, spending a few hours of her time and $33. Earlier this month, the county counsel approved the change and the modification was recorded. For Bissen, it was a symbolic victory, but a victory nonetheless.

“It felt good to quite literally draw a line through the overtly racist language in the restrictive covenant,” she wrote in an email. “The language was blatantly wrong and doesn’t represent who we are as a community.”

Betty Williams, president of the Greater Sacramento NAACP, would like to see legislative action taken to completely scrub racial covenants from property documents all over the country.

“It really pisses me off, to be quite frank,” she said. “It’s very frustrating, and in this day and age, I’m not sure why it’s still there.”

Others say records of the covenants should remain as a reminder of the past.

“This is a much broader political, philosophical, social issue — and that is whether it is appropriate to erase history,” said Oakland-based real estate and land use lawyer Zack Wasserman. “There are some who would like to not refer to the Holocaust at all. There are some who would like the Confederate flag not to exist.”

Today, few home owners bother to redact racial language they find in their property documents.

In Alameda County, just one property owner has submitted the paperwork to have a discriminatory covenant redacted, said Matt Yankee, chief of the Clerk-Recorder’s Office. A second property owner inquired, but was deterred by the price — it would have cost more than $100, because that particular home’s restrictive covenant was so long.

No one has submitted paperwork in San Mateo County, and Bissen was just the second home owner to do so in Contra Costa County in recent years. San Francisco did not respond to requests for comment, and a representative from Santa Clara County said the clerk-recorder’s office does not track the number of restrictive covenant modifications filed.

To Williams, allowing racially discriminatory language to remain on the books is like taking a step backward after the triumphs of the Civil Rights movement.

“My hope is that everyone, regardless of their color, look into this,” she said, “and start moving towards the termination of this language.”

Does your home have a racially restrictive covenant?

If it does, and you want to change it, here’s how:

Go to your county recorder’s office and purchase a certified copy of your property record containing the racially restrictive covenant. Draw a line through the discriminatory language, then request a “restrictive covenant modification” form from the county recorder’s office, fill it out and get it notarized. Turn in the form, along with a copy of the document with the racially restrictive language stricken out, to the county recorder’s office. The county counsel will review the paperwork, and when he or she approves the submission, the modification will be recorded.

Be prepared to pay fees for the property document, a notary, and filing the form (though some fees may be waived.)

For more information, visit: https://www.dfeh.ca.gov/legal-records-and-reports/restrictive-covenants/.