From June of this year, footballers will face sanctions if they lift up their shirts to reveal slogans or messages on an undergarment.
The new law will come into effect before the start of this summer's World Cup in Brazil.
The decision was taken at a meeting of the International FA Board, the game's law-making body, in Zurich.
Overt slogans have long been banned by FIFA, world soccer's governing authority, but players often lift up their shirts after scoring to display other messages.
Speaking after the IFAB meeting, FIFA secretary general Jerome Valcke said: "From now on, there can be no slogan or image whatsoever on undergarments - even good-natured ones.
"This will apply from June 1 and be in force for the World Cup."
The Football Association had proposed the ban to make sure there was a consistent message and its general secretary Alex Horne said: "The idea is to get some consistency. The simplest rule for the image of the game is to start from the basis that slogans will not be allowed."
Jonathan Ford, chief executive of the Football Association of Wales, said: "Everyone agreed about political or religious statements but on personal statements some of us did consider how far are we going.
"We decided, however, it was easier for us to say it has no place in the game."
Referees will not book players who display messages. Disciplinary action will be meted out by the footballing authorities in charge of the respective matches.
At the same meeting on Saturday morning, IFAB rejected a proposal from European soccer's ruling body UEFA to review the so-called 'triple punishment.'
This occurs when a player is sent off, concedes a penalty and is later suspended for stopping a goalscoring opportunity.
"We don't want to flip back to where we were before where some goalkeepers knew that if they could not be sent off, they would simply take out the attacker," said Scottish FA chief executive Stewart Regan.
"It will make such an impact on the game of football if it's changed, we have got to get it right."
Horne added: "A lot of us felt that taking UEFA's wording would reopen the door for cynical fouls.
"That is not to say we don't listen, we don't understand. Maybe we just need to re-educate people about why it was introduced in the first place."
And there will be no extension in the use of technology, which will be restricted to goal-line verdicts only.
Valke said: "There is a risk that using the video will change the nature of the game and maybe we will reach the day when the referee will ask one day to stop the game to make sure he has made the right decision."
IFAB also reported to agree to continue with pilot studies of sin-bins to used instigated instead of yellow cards cards.
It was agreed that Sikh men would be allowed to wear approved head coverings in games following a similar ruling for women.
FIFA ratified the use of head scarves for women, a measure which had been provisionally approved in July 2012 to allow women Muslim players to wear the hijab.
Valcke added: "We had a request from the Sikh community to play with headgear and, to avoid discrimination against men, it was decided that what applied to women can apply to men.
"We will work exactly on the definition on these covers."