That solution assumes that there is only a single, fixed, address for each website.
That may be true for a personal site or the site of a small company (especially when it already exists for a long time), but for more commonly requested sites like facebook, youtube, etc this is not at all the case. Such websites have many IP addresses that are rotated all the time to distribute the load, cover outages, etc.