Would you like to learn how to use the CURL command to get only the headers of the requested URL? In this tutorial, we are going to show you all the steps required to get website headers using the CURL command on a computer running Ubuntu Linux.
• Ubuntu 20
• Ubuntu 19
• Ubuntu 18
Tutorial Curl – Get headers only
Use the Curl command to get only the headers of an URL.
Here is the command output.
In our example, the header got shows that a URL redirect is in place.
Use the following command to force CURL to follow URL redirects.
Here is the command output.
Optionally, you may save the URL headers to a log file.
Here is the file content.
Congratulations! You learned how to use the CURL command to get URL headers.
Tutorial Curl – Get HTTPS headers
Use the Curl command to get the headers from an HTTPS URL.
Here is the command output.
Use the following command to force CURL to include the HTTPS negotiation.
Here is the command output.
Congratulations! You learned how to use the CURL command to get HTTPS URL headers.