The European Court of Justice has ruled on the matter after cosmetics manufacturer Coty filed a complaint.
Brand owners have previously argued that they should have the right to choose their distributors to protect their image and exclusivity.
The issue is significant in Europe, whose companies account for 70 percent of global luxury goods sales.
Coty wanted to block German perfume chain Akzente from selling its products on Amazon's German website and that is when the matter went to court.
It said: "A supplier of luxury goods can prohibit its authorised distributors from selling those goods on a third-party internet platform such as Amazon".
However, e-tailers such as Amazon and eBay have countered that the ruling to curb online sales will be harmful to small businesses while being anti-competitive.
"It is a clear ruling for the protection of luxury brands' image, the defence of our teams' work and the protection of consumers' rights and information", Coty said.
The issue has split European Union countries, with Germany more eager to promote e-commerce.
"The court notes in this context that the quality of luxury goods is not simply the result of their material characteristics, but also of the allure and prestigious image which bestows on them an aura of luxury", it says.
Germany will now have to fall in line though, said a competition lawyer, who declined to be named.
The decision out of Luxembourg comes in response to contractual proceedings that the luxury retailer Coty Prestige initiated in Germany against one of its authorized retailers.