In August, a young white man who admitted to targeting Mexicans killed 22 people in an El Paso Walmart. In New Zealand, 51 people were killed when a gunman attacked mosques filled with worshipers observing Friday prayers. In the past year, a total of 12 worshipers were killed in the U.S. in two hate-motivated attacks on synagogues in Pittsburgh and San Diego.

In each of these cases, the killers were white men with a history of extremism. The San Diego gunman, for instance, left a manifesto on 8chan also claiming responsibility for a mosque fire. And the San Diego and New Zealand gunmen posted hate-filled online manifestoes that included internet-culture references, such as references to memes and a notorious shout-out to a noteworthy YouTube personality. Both of them mentioned or alluded to the “white genocide” — which the Anti-Defamation League defines as the white-supremacist belief that the white race is “dying” because of growing nonwhite populations and “forced assimilation.”

But of course, it’s not just that we want to prevent our sons from becoming perpetrators of mass shootings. We want to raise them to be the kind of men who would never march with the neo-Nazis who chanted “Jews will not replace us” in Charlottesville before one of them killed a counterprotester, Heather Heyer. Beyond that, we want to keep them from becoming supporters of the racism, anti-Semitism, Islamophobia and gender- or sexuality-based hatred that is on the rise.

Unfortunately, extremists know how to find new recruits in the very place our sons spend so much of their time: online. And too often, they’re more aware than we are of how vulnerable young white men are to radicalization.

According to Jackson Katz, author of “The Macho Paradox: Why Some Men Hurt Women and How All Men Can Help,” it’s not necessarily the ideology behind white nationalism, anti-feminism or the alt-right that initially appeals to young white men and boys as much as it is the sense of being part of a “heroic struggle.”

Participating in the alt-right community online “offers the seductive feeling of being part of a brotherhood, which in turn validates their manhood,” Dr. Katz says. YouTubers and participants in chat forums like 4chan, the defunct 8chan and Discord “regularly denigrate liberal or progressive white men as soft, emasculated ‘soy boys’ and insufficiently aggressive or right-wing white men as ‘cucks.’”

It also seems to me, as a mom, that these groups prey upon the natural awkwardness of adolescence. Many kids feel out of place, frustrated and misunderstood, and are vulnerable to the idea that someone else is responsible for their discontent. When they’re white and male, they’re spoon-fed a list of scapegoats: people of color, feminists, immigrants, L.G.B.T.Q. people. If they really embrace this, it’s not hard to convince them that there’s a “white genocide” happening and that these people — and the “leftists” who represent their interests — are to blame.