Websites are created to help visitors take an action, such as making a purchase or a donation. As visitors browse various web pages, they may take rapid steps toward the action or may bounce away. Websites that can adapt to match such consumer dynamics perform better. However, assessing visitors’ changing distance to the action, at each click, and adapting to it in real time is challenging because of the sheer number of design elements that are found in websites, that combine exponentially. We solve this problem by matching latent states to web page designs, combining recent advances in multiarmed bandit (MAB), website morphing, and hidden Markov models (HMM) literature. We develop a novel dynamic program to explicitly model the trade-off firms face between nudging a visitor to later states along the funnel, and maximizing immediate reward given current estimates of purchase probabilities. We use an HMM to assess visitors’ states in real time, and couple it with an MAB model to learn the effectiveness of each design × state combination. We provide a proof of concept in two applications. First, we conduct a field study on the Master of Business Administration website of a major university. Second, we implement our algorithm on a cloud server and test it on an experimental online store.