The injunction, which protects the star’s anonymity, was upheld at London’s High Court. But the judge lifted a ban on naming 24-year-old escort Helen Wood, who reportedly had sex with Rooney and another call girl, Jennifer Thompson, before England’s World Cup campaign last summer.
Wood, a single mother from Bolton, Greater Manchester, claims to have had sexual intercourse with the actor, who is a father.
According to The Sun, she was paid £195 (€220) for the encounter.
Proceedings were rushed through court in the last few days after the celebrity discovered that Wood had spoken to a newspaper.
Challenging a temporary injunction granted earlier, Richard Spearman QC argued she should be allowed to tell her story. But Mr Justice King ruled that the ban on naming the actor should stand.
This is the latest in a series of injunctions taken out by almost 30 celebrities and sports stars in a bid to prevent lurid headlines and unflattering publicity.
It raises once again the issue of how far the courts should go to protect an individual’s privacy.
Last year, England captain John Terry faced allegations about his private life after a gagging order was lifted.
The footballer’s alleged affair with Vanessa Perroncel, the ex-girlfriend of team-mate Wayne Bridge, was later splashed across the press, bringing Terry the public scrutiny he sought to avoid.
Just days later he paid the price and was stripped of the England captaincy.
In November, Take That star Howard Donald lost his fight to keep an injunction obtained against a former girlfriend.
An interim order banned the reporting of his relationship with musician Adakini Ntuli.
Other famous faces who have avoided an expose include a TV presenter, a football manager and a number of Premier League players.
Meanwhile, one tabloid newspaper was gagged on Wednesday night by lawyers for a married Premier League star after he was reportedly caught with Big Brother’s Imogen Thomas.
According to The Sun, the player and model met up, sometimes just before key games, at a string of luxury hotels over a period of six months.
The player’s agent told The Sun: “I’m shocked. This is incredible. I can’t believe it. He’s such a family man.
“I don’t know what to say, knowing the closeness of his family.”