An investigation was launched amid complaints that ads for the chocolate frog had been placed close to a primary school.
Adverts for Freddo bars, the Cadbury chocolate frog, have been banned for breaking rules on marketing junk food to children.
An investigation was launched by regulators after a poster promoting the product was seen on a bus stop within 100m of a primary school.
Complaints were also made about two YouTube ads for Freddo – as well as the Cadbury’s website, which featured a downloadable comic and audiobook about the character’s mission to find his friend’s missing hop.
Mondelez, which owns Cadbury, insisted that the poster was put up close to a school in error – and said the brand has a “long-standing commitment to not market directly to anybody under the age of 16”.
The company added: “On social media platforms we go above and beyond the advertising code – we only ever target our advertising to those over 18.”
Under current regulations, ads for products that are high in fat, salt and sugar cannot be directed at children – and no medium can be used for advertising if 25% of its audience is under the age of 16.
With regards to the YouTube channels, the ASA acknowledged it wasn’t possible to know what proportion of their audience were under the age of 18 because unregistered users or users who weren’t logged in could also watch them.
As well as banning the poster, the advertising watchdog also banned the comic and audiobooks, saying: “We told Cadbury to take reasonable steps in future to ensure high in fat, salt or sugar (HFSS) product ads were not directed at children through the selection of media or the context in which they appeared.”
A Mondelez spokeswoman said: “We are already taking the insights and views provided by the ASA as part of this ruling and applying those learnings to our future content so we can continue to build on our commitment in this area.”
Ministers are due to consult on policies to reduce childhood obesity, including a watershed for unhealthy food adverts on TV, and how to regulate on-demand and online adverts.