This work proposes a method to improve the QoS provided to internet users by website servers. In particular, the goal is to minimize the expected number of browsing steps (clicks), also known as the expected path length, which are required to reach a website page by a community of users. We use Markov chain modeling to represent the transition probabilities from one webpage to another, and the first passage from page to page that can be retrieved from web server logs. The proposed method deletes links among webpages to minimize the expected path length of the website. Three different methods for achieving this goal are examined: (i) a greedy deletion heuristic; (ii) an approximated branch and bound algorithm; and (iii) a cross‐entropy metaheuristic. Numerical studies show that the proposed greedy heuristic results in the optimal solution in more than 60% of the tested cases, while in almost 90% of the cases, the obtained solution is within 10% of the optimal solution. Both the approximated branch and bound and the cross‐entropy methods achieved optimality in more than 80% of the tested cases; however, this came with a much higher computational cost. Copyright © 2016 John Wiley & Sons, Ltd.