The scheduled April 25 trial relates to Trump's alleged rape of Carroll in late 1995 or early 1996 in a Bergdorf Goodman department store dressing room in Manhattan.
In his Oct. 12 post, Trump said he did not know Carroll, that she made up the rape claim to promote her memoir, and that the claim was a "hoax," "lie," "con job" and "complete scam."
Trump said his post amounted to commentary about Carroll's earlier lawsuit and his defenses, and therefore was protected.
But the judge said Trump's post was neither a "report of any judicial proceeding" nor a "fair and true report" of such a proceeding that would justify immunity.
The case is Carroll v Trump, U.S. District Court, Southern District of New York, No 22-10016.