If You need always get HTML result I recommend use using curl flag "-L":
curl -L yahoo.com
curl -L https://www.yahoo.com
This flag force curl follow all URL redirects (graphical browser behavior). In case when site will redirect you couple of times, for example, to regional version, you always have chance get final HTML.
From curl man:
(HTTP) If the server reports that the requested page has moved to a different location (indicated with a Location: header and a
response code), this option will make curl redo the request on the new place. If used together with -i, --include or -I,
headers from all requested pages will be shown. When authentication is used, curl only sends its credentials to the initial
a redirect takes curl to a different host, it won't be able to intercept the user+password. See also --location-trusted on
change this. You can limit the amount of redirects to follow by using the --max-redirs option.
When curl follows a redirect and the request is not a plain GET (for example POST or PUT), it will do the following request
GET if the HTTP response was 301, 302, or 303. If the response code was any other 3xx code, curl will re-send the following
using the same unmodified method.
You can tell curl to not change the non-GET request method to GET after a 30x response by using the dedicated options
--post301, --post302 and --post303.