We study a variant of the display-ad allocation problem where an online publisher needs to decide which subset of advertisement slots should be used in order to fulfill guaranteed contracts and which subset should be sold on supply side platforms (SSPs) in order to maximize the expected revenue. Our modeling approach also takes the uncertainty associated with the sale of an impression by an SSP into account. The way that information is revealed over time allows us to model the display-ad allocation problem as a two-stage stochastic program. We refer to our model as the Stochastic Programming (SP) model. Numerical experiments show that the SP model performs well in most cases. We compare the solutions of the SP model with the solutions of an allocation policy (the Priority Assignment (PA) heuristic) that is used in practice. We find that the performance gap between the PA heuristic and the SP model depends on the fraction of total impressions that need to be allocated to the guaranteed contracts. The results suggest that the benefit of using the SP model is highest in periods where the website traffic is high compared with the targets for the guaranteed contracts.