curl with follow

Use option -L for this:

curl --head -L http://www.wikipedia.org