Websites can link to freely available content without the permission of the copyright holder, the European Court of Justice says.
The court's decision came after a dispute in Sweden between journalists and a web company that had posted links on its site to online news articles.
A Swedish court had asked the EU court to consider whether this broke copyright law.
The "position would be different" for links that bypass a paywall.
The journalists worked for the Swedish newspaper Goteborgs-Posten and had articles published on the paper's website.
The company Retriever Sverige runs a website that provides links to articles published by other websites.
Broken the internet
The journalists argued in the original case that users of Retriever Sverige's website would not know that they had been sent to another website by clicking on the links and therefore had made their articles available without authorisation. They said that because of this they were due compensation.
The case was unsuccessful in the Swedish courts but there was an appeal and the appeal court asked the EU Court of Justice to consider whether copyright law had been broken.
The court had to consider whether by providing links Retriever Sverige had taken part in an "act of communication to the public". Under EU copyright law, authors have the exclusive right to authorise or prohibit any communication to the public of their works.
The court ruled that the law had not been broken because the articles in question were on Goteborgs-Posten's website and therefore already "freely available".
In a statement it said: "The owner of a website may, without the authorisation of the copyright holders, redirect internet users, via hyperlinks, to protected works available on a freely accessible basis on another site."
But they ruled that the "position would be different" if a link led users to material that had purposely been restricted from being freely available - for example if it had been posted on a site that operates a paywall.
"If the decision had gone the other way it would have broken the internet," said Susan Hall, technology lawyer at Clarke Willmott.
"The way we communicate online is predicated on sharing material, whether that's links to Robert Peston on Bank of England interest rates, decisions of the European court or pictures of otters who look like Benedict Cumberbatch," she said.
Goteborgs-Posten told the BBC that it was making no comment on the ruling.