We develop an optimizing model of a farm that is subject to invasion by an infectious disease such as bird flu, where the probability of invasion depends on the degree of free- ranging on the farm and post-invasion rate of spread on the farm depends on the farm size, the farmer's surveillance efforts, and the degree of free-ranging. We examine optimal policies for the farm and for the government, and analyze how these policies are affected by the degree of free-ranging. We find, inter alia, that when the farm size is endogenous fining an infected farm is superior as an instrument than providing it a rebate on costs, but when the farm size is exogenous the two instruments are equivalent. We also find that optimal surveillance effort, farm size, and fines are smaller for free-range farms when costs are sensitive to the degree of free-ranging.