A former Navy sailor was sentenced in 2009 to 10 years in prison for leaking the details about the battle group to the website, but the group was never attacked.
"This investigation further demonstrates law enforcement's resolve to bring to justice anyone who supports those who would target American interests at home or abroad," said John Sandweg, acting director of U.S. Immigration and Customs Enforcement.
The judge didn't immediately accept Ahmad's plea while she awaits information from probation officials, but she said the plea was voluntarily made.
The two men, British citizens who were living in Britain at the time, faced charges in Connecticut because authorities said they used an Internet service provider in the state to run one of the websites.
A charge of conspiring to kill people in a foreign country will be dismissed under the plea agreement.
The websites operated under the name of Azzam Publications, which authorities say provided support to Afghanistan's ousted Taliban regime and focused on the wars in Bosnia and Chechnya in the 1990s. The sites asked for donations of military suits and gas masks for the Taliban and appealed to Pakistanis to travel to Afghanistan to fight, according to Ahmad's plea agreement.
The websites posted articles on how to train for fighting and gave guidance on how women could participate in jihad, or holy war. The sites produced videos of Muslims detailing their experiences on the battlefield in Bosnia and advertised videos of battles in Chechnya.
Ahsan, 34, has been diagnosed with Asperger's syndrome, said his attorney, Richard Reeve, who described him as very intelligent. He said Ahsan didn't operate the websites.
Ahmad, 39, was held without trial for eight years in a British prison, raising concerns among human rights advocates. He said in court that he was treated for post-traumatic stress disorder in 2009 and 2010, but he didn't offer details.
In an interview after the BBC won a legal battle to speak with him, Ahmad insisted he didn't condone terrorism and urged authorities to put him on trial in the U.K. He acknowledged he had visited Bosnia several times during the 1990s and had been involved in the conflict there.
Ahmad faces up to 25 years in prison and Ahsan faces up to 15 when they are sentenced on March 4.