Rossoneri coach claims the rule book is not always applied fairly to offending players after the striker was sent off in two successive games, the second for swearing at officials
The Rossoneri striker, who has scored 14 goals in 28 league games, was handed a three-match ban (which Milan have appealed) for using abusive language towards an assistant referee in their 2-1 win at Fiorentina on Sunday.
It was the striker's second red card after having just returned from a three-match ban, which was reduced to two after he lashed out against an opponent in the 1-1 draw with Bari last month.
Allegri feels Ibrahimovic has been targeted for punishment. He claims referees and linesmen often let episodes where players swear past them without pulling out any cards.
"For 'Ibra' there was a rule applied, but at times there are players who do the same things and people just look over it," Allegri told Studio Sport.
Yet, there was a reminder for his striker to watch his language on the field of play.
"The best protection is for a team to play with attention," he added.
Allegri also spoke about Napoli who are three points behind Milan in the race for the Serie A title.
"[Napoli coach] Walter Mazzarri must be happy with what he is doing," he added.
The league leaders will face struggling Sampdoria on Saturday.