This paper provides a detailed explanation how the law of the World Trade Organization regulates environmental subsidies with a focus on renewable energy subsidies. The paper begins by discussing the economic justifications for such subsidies and the criticisms of them and then gives examples of categories of subsidies. The paper provides an overview of the relevant World Trade Organization rules and case law, including the recent Canada-Renewable Energy case. The paper also makes specific recommendations for how World Trade Organization law can be improved and discusses the literature on reform proposals. The study finds that because of a lack of clarity in World Trade Organizaion rules, for some clean energy subsidies, a government will not know in advance whether the subsidy is World Trade Organization-legal