In a statement, the federal commissions in charge of gambling, lotteries and betting said they would soon publish a “blacklist” of online gambling sites that would be blocked as of July 1st.
Campaigners tried to block the law change last year by gathering the 50,000 signatures needed to put it to a referendum, warning the plan's internet restrictions pose a serious threat to liberties online.
The Swiss government argued at the time that the Gambling Act, which had already been passed by both houses of parliament, updated legislation for the digital age, while raising protections against addiction.
The law will allow only casinos and gaming companies certified in Switzerland to operate in the country, including on the internet.
The law will meanwhile for the first time enable Swiss companies to offer online gambling.
As of Monday, people in Switzerland will no longer be able to access any of the blacklisted sites, the two commissions said in their statement.
A law to combat gambling addiction
The law is meant to help combat gambling addiction, which according to Addiction Switzerland afflicts some 75,000 people in the Alpine nation of 8.3 million people, costing society more than half a billion Swiss francs (€450,000) annually.
The law will enable Switzerland to tax revenues from online gambling activities, with the proceeds set to help fund anti-addiction measures.
According to the government, Swiss gamblers spend around 250 million Swiss francs annually on unregulated betting sites abroad that pay nothing into public coffers.
The big winners will be Switzerland's 21 registered casinos, which will begin offering online gambling, and the Swiss lotteries, which will begin offering sports betting.