Electricity customers who install solar panels often are paid the prevailing retail price for the electricity they generate. We demonstrate that this rate of compensation typically is not optimal. A payment for distributed generation (w) that is below the retail price of electricity (r) often will induce the welfare-maximizing level of distributed generation (DG) when the fixed costs of centralized electricity production and the network management costs of accommodating intermittent solar DG are large, and when centralized generation and DG produce similar (pollution) externalities. w can optimally exceed r under alternative conditions. The optimal DG compensation policy varies considerably as industry conditions change. Furthermore, a requirement to equate w and r can reduce aggregate welfare substantially and can generate pronounced distributional effects.