Pandemic-driven housing trends have certainly pushed a city-to-suburb exodus, but at the other end of the spectrum are millions whose living arrangements were upended due to job loss, closed college dorms, nursing home fear or a need to live near loved ones. Those motives fueled another trend: the rise of the Accessory Dwelling Unit.

Also known as granny flats, casitas or guest houses, ADUs are, by definition, second, smaller homes on the same property as a main house. They can be separate from the house or attached, but with their own kitchen, bathroom and outside entrance.

“It has to be a fully functioning little house where someone can prepare basic food and shower,” said Palo Alto architect Mary Maydan, who has designed five finished ADUs and has four on the drawing board at her firm Maydan Architects. Many have separate utility lines and a dedicated parking place.

Additional living quarters like these have been around for a while, but ADUs have become hot properties now and cities are relaxing rules to allow for more, say real estate experts.

“This change is happening across the country,” said Corina Rollins, a real estate appraiser who teaches real estate principles and economics at College of Marin. “In New York, where I grew up, it was common, but not legal, to turn a basement into a secondary living unit and rent it out. What we’re seeing today isn’t much different from those bootleg rentals, only now they’re more often legal.”

Largely in response to the pandemic, cities have begun to relax rules that used to bar ADUs, especially in expensive housing markets with limited inventory. “What we’re seeing is a recognition that ADUs are important components of housing,” Rollins said.

“A year ago, almost no one knew what an ADU was,” Maydan said. “Now everyone does. They are popping up everywhere and providing that instant extra space families have needed.”

Before last year, only about 10 percent of her residential clients wanted to include an ADU in their home plans; today, it’s more than 50 percent, said Maydan, who built an ADU on her property in 2004 for her parents. “California had a lot of rules back then that made it difficult. Not anymore. The pandemic has definitely changed the way we are building homes.”

Besides offering more independent living space for aging parents or boomerang kids, ADUs can be revenue-producing rentals. They also make great home offices, gyms or a place to get out of the house. Whatever the purpose, an ADU’s beauty lies in the fact that it is separate but near.

If you’re interested in creating one where you live, here’s what to know, so your ADU doesn’t stand for Another Dumb Undertaking:

Check first. Although ADUs are gaining favor among cities, be sure to ask your zoning department about restrictions in your area. “Don’t go by what your friend tells you he did,” Rollins said. “You need to check with your city.”

Know your options. Those looking to add an ADU can either convert existing space, like a garage, attic or basement, or build a new structure. Traditional construction (called stick built) is one option, but putting up a prefabricated ADU is also popular. Prefab ADUs come in sections assembled off-site, so they go up faster and cost less. They aren’t custom, though, so they don’t always go with the main house’s architecture. A third option just coming to the market is the 3D-printed ADU.

Tie it to the house. Maydan encourages homeowners to make sure the ADU doesn’t look like an afterthought, even if it is. Connect it visually to the main house through architectural design or even by just adding stepping stones between the houses. For one homeowner, Maydan retrofitted a prefab ADU to better integrate it architecturally with the main house.

Make it multipurpose. The beauty of a well-conceived ADU is that you can build it and find, as your life flows along, the ADU serves different needs,” Rollins said. “What serves as your home office today may become a house for your child as he or she transitions from college to career, and later for your aging parents. And after that, it might become an income-producing rental.”

Move in yourself. ADUs can help aging homeowners who don’t want to move or sell their homes. If they move into the ADU on their property, they can rent out the main house to a family who needs the space. This lets the owners age in place and get a little income.

Know your market. Some studies have shown that homes with ADUs have sold far faster during the pandemic than homes without and added a nice bump to the selling price, Rollins said, but whether you will recoup your investment depends on many variables. The initial cost and quality, visual appeal, income property possibilities and demand all factor in.