The European Parliament voted on Tuesday to remove barriers to cross-border online shopping within the European Union (EU), allowing people to buy at the same prices and conditions from across the 28-member bloc.
The new rules were approved by 557 votes to 89 with 33 abstentions.
They will still need to be approved by the European Council.
The rules should go into effect before the end of the year, the parliament said in a statement.
Under the law, shoppers will not be blocked or automatically re-routed due to their nationality when purchasing products or making hotel bookings, renting cars or buying tickets online.
Treating customers differently because of where a credit or debit card has been issued will also be prohibited.
"This new EU law on geo-blocking is an important step towarads an even more cometitive and integrated digital single market," Polish MEP Róża Thun said in the statement.
"It also represents another milestone in the fight against the discrimination of consumers based on their nationality or place of residence."
A study by the Commission found that 63% of websites do not allow shoppers buy from another EU country.
For tangible goods, geo-blocking was highest, at 86%, for household appliances.
With services, online reservations for leisure pursuits such as sports events tickets were highest, at 40%.
Traders will not have to deliver to all EU countries, but buyers will have an option to agree with the trader where a package can be collected.
Copyrighted digital content such as e-books, downloadable music or online games will not be covered by the new rules.
The Commission will assess within two years of the new rules coming into force whether to include such goods in the ban on geo-blocking.
According to Luxembourg-based Eurostat, the EU's statistical office, 68% of internet users in the bloc shopped online last year.