Constructing a no-fly zone (NFZ) is a straightforward and effective way to facilitate the coexistence of unmanned aerial vehicles (drones) and existing systems (typically satellite systems). However, there has been little work on understanding the optimal design of such NFZs. In the absence of this design, one invariably ends up overestimating this region, hence significantly limiting the allowed airspace for the drones. To optimize the volume of the NFZ, we formulate this task as a variational problem and utilize the calculus of variations to rigorously obtain the NFZ as a function of the antenna pattern of victim receivers and the spatial distribution of drones. This approach parallels the matched filter design in the sense that the NFZ extends in directions where the antenna gain and/or the density of drones is high. Numerical simulations demonstrate the effectiveness of our optimal design compared to the known baselines in reducing the volume of the NFZ without compromising the protective performance.