Alphabet's (GOOG 9.35%) (GOOGL 9.51%) Google and Facebook (META -0.22%) will have to pay media companies for news they publish on their platforms in Australia. 

The federal government has told the Australian Competition and Consumer Commission, the country's competition watchdog, to create an enforceable code of conduct that will apply when tech companies are working with news media organizations.

Coronavirus Pandemic in white letters against a red map of Australia with COVID germs.

IMAGE SOURCE: GETTY IMAGES.

By putting a mandatory code on the books, Google and Facebook would have to pay media companies for the content they run on their platforms, Josh Frydenberg, Australia's treasurer, told ABC Australia."It's only fair that those that generate content get paid for it," said Frydenberg, noting the code of conduct levels the playing field. 

Initially, the ACCC has been mandated to create a voluntary code but recently told the federal government reaching an agreement on payments for publishing content would be hard to come by and thus the mandatory code of conduct. Talks were supposed to continue until November, but with media companies getting hit hard amid the COVID-19 pandemic, the government now wants to make the code mandatory as soon as possible. The code is expected to be completed by the end of July.

In an interview with Bloomberg, Frydenberg said tech companies may have to pay based on the cost of creating journalistic content or based on the value it brings to the digital platform.  In addition to forcing the likes of Facebook and Google to pay for news content, the code will cover data sharing, the ranking of news on the platforms, and sharing revenue generated from the content. The code will be enforced via penalties and sanctions. 

Facebook said it had been working to come to a voluntary agreement and is disappointed by the decision. Google said that it has spoken with more than 25 publishers in Australia about a voluntary code of conduct since February.