You can dump the headers of the response with the -D
option:
curl -s -D - http://www.example.com -o /dev/null
Response:
HTTP/1.1 301 Moved Permanently
Date: Fri, 07 Oct 2016 07:50:51 GMT
Server: Apache/2.4.10 (Debian)
Location: https://www.newexample.com/
Content-Length: 309
Content-Type: text/html; charset=iso-8859-1
-s
is for Silent mode (don't output anything)