Those corners of the internet can be tough for law enforcement to mine, said Clint Watts, a research fellow at the Foreign Policy Research Institute. “It’s a free-for-all and it’s anonymous,” said Mr. Watts. Mr. Watts said law enforcement now has to use more “human intelligence” sources.

Rather than relying on computers scraping websites and forums for suspicious activity, law enforcement increasingly must turn to the expensive and difficult work of gathering information through individual relationships and infiltration of extremist groups, he said.

Another difficulty in thwarting attacks: The vast majority of young disaffected men who embrace white nationalist ideology won’t commit mass violence, said Dr. Jonathan Metzl, a professor at Vanderbilt University who has studied the role of white nationalism in mass shootings. He said that more focus is needed on combating the ideology, given the difficulties of trying to predict the next mass shooters.

Others, including some members of Congress and experts who study U.S. extremism, said the FBI has been too slow to divert some of the extensive resources it devotes to combating Islamic terrorism to thwarting domestic hate groups. The bureau expended considerable resources on white supremacy in the 1990s but changed its focus after the Sept. 11, 2001, terrorist attacks.