You know the story: Kids leave home to explore the world, eventually settling down in the greenest pastures they can find. But when these restless youngsters are baby fish and coral larvae, how do they choose the best place to make their new home? New research suggests that these creatures smell their way to neighborhoods where the living is good. Scents emitted by certain species of adult corals draw fish and coral larvae to healthy reefs, while the noxious odor of out-of-control seaweed drives them away from damaged ecosystems.

“These are fantastic results,” says Jelle Atema, a chemical and behavioral ecologist at Boston University. The findings demonstrate “dramatic differences” in coral or fish behavior, he says, and “how important chemical signals are in regulating the interactions between corals and seaweeds and fishes.”

Young fish and coral larvae are cast out into the open ocean after they are born, to swim or float away on currents to new ecosystems. Some eventually return to their spawning grounds—especially if their hometown happens to be in a protected marine habitat—while others settle elsewhere. But these days, many fish and coral larvae are finding themselves with limited options: More and more unprotected reefs have been taken over by seaweed, which smothers coral, disrupts food webs, and perhaps even poisons potential settlers.

Both fish and coral larvae have been observed navigating away from those degraded reefs and toward healthy ecosystems. This behavior is particularly surprising for coral larvae, says Mark Hay, a chemical marine ecologist at the Georgia Institute of Technology (Georgia Tech) in Atlanta. A baby coral is “a bag of snot with some cilia around it. How could it go one place and not another?”

Hay and fellow Georgia Tech biologist Danielle Dixson decided to investigate. First, they collected water from marine protected areas with healthy reefs off the coast of Fiji and from nearby unprotected reefs where seaweed had taken over. Back in the lab, they used those samples to infuse the chemical signature of each potential habitat to create areas in a flume tank with currents running through it that “smelled” like each type of ecosystem. Then they gave fish and coral larvae collected from Fijian coastal waters a choice: Would they swim toward an area spiked with the scent of a healthy reef, or toward an area that smelled like seaweed? Would they be able to tell the difference based on smell alone?

It turned out they could. Even in the absence of actual adult corals and seaweed, coral larvae were four to five times more likely to swim toward the sweet-smelling “neighborhoods” than the more putrid smelling seaweed-dominated waters from less healthy systems, the team reports online today in Science. Meanwhile, young fish gravitated to the healthy-smelling waters four to eight times more than to the seaweed-scented areas.

Similar results were seen in the field, where researchers set up temporary populations of live coral, algae, and seaweed species, a mere 100 meters apart. The young corals in particular studiously avoided the noxious seaweed: “There’s a blanket of stink on the bottom over there and they just won’t go through,” Hay says. The most attractive environment for coral larvae by far proved to be a combination of adult coral and crustal coralline algae; adding the scent of algae to the plates in the field increased settlement rate by 1600% compared with the controls. What’s more, surveys of Fiji’s protected reefs showed five to eight times more new fish recruits than in unprotected reefs nearby.

“Any one of those experiments alone would be pretty cool, but the combination is just incredible,” says Nancy Knowlton, a coral reef expert from the Smithsonian Institution in Washington, D.C., who was not involved in the research. Combining lab and field experiments paints a “much more realistic” view of the power of smells in the water, she says. “They [the corals and seaweed] are obviously changing the whole chemical ecology of the water around the reef.”

Knowlton says she is pleased to see that the research also points to low-cost tools for restoring reefs. Perhaps parrotfish, which like to munch on seaweed, could be given a reprieve from commercial fishing; their increased population could help control the seaweed and its nasty odor with little help from humans. Fishermen could also plant adult corals from attractive species—or even add a dash of crustose coralline algae—to attract more young fish and coral larvae to degraded areas, something like real estate agents baking cookies before an open house to make a home seem more attractive.

Reefs face increasing pollution and ocean acidification, along with rising temperatures in a changing world, and for the past decade researchers have been full of gloom and doom, says Robert Steneck, a coral reef ecologist at the University of Maine’s Darling Marine Center in Walpole. He, too, is happy to see these results, noting that these suggested management techniques could start a positive trend. As more and more fish and coral settled in these formerly undesirable neighborhoods, the reef would start generating healthy smells on its own, attracting even more species and eventually restoring the damaged reef to its former glory.