This article is also available in:
cURL is a command line tool for sending HTTP/HTTPS requests and is useful for troubleshooting:

HTTP/HTTPS Performance
HTTP Error Responses
HTTP Headers
Comparing Server/Proxy Responses
SSL Certificates

cURL is not installed by default in Windows and requires an install wizard.

In this article, we will show you how to troubleshoot requests with cURL.

Step by Step Tutorials

Run the following command to send a standard HTTP GET request to your website (replace with your domain and host name):

curl -svo /dev/null

This example cURL command returns output detailing the HTTP response and request headers but discards the page body output. cURL output confirms the HTTP response and whether ShopBase is currently proxying traffic for the site.

Review the cURL command options for additional functionality.

Refer to the list below for tips on troubleshooting HTTP errors, performance, caching, and SSL/TLS certificates:

HTTP errors

When troubleshooting HTTP errors in responses from ShopBase, test whether your origin caused the errors by sending requests directly to your origin web server. To troubleshoot HTTP errors, run a cURL directly to your origin web server IP address (bypassing ShopBase's proxy):

curl -svo /dev/null --connect-to ::

If you have multiple origin web servers, test each one to ensure there are no response differences. If you observe the issue when connecting directly to your origin web server, contact your hosting provider for assistance.


cURL measures latency or performance degradation for HTTP/HTTPS requests via the -w or --write-out cURL options. The example cURL below measures several performance vectors in the request transaction such as duration of the TLS handshake, DNS lookup, redirects, transfers, etc:

curl -svo /dev/null -w "\nContent Type: %{content_type} \
\nHTTP Code: %{http_code} \
\nHTTP Connect:%{http_connect} \
\nNumber Connects: %{num_connects} \
\nNumber Redirects: %{num_redirects} \
\nRedirect URL: %{redirect_url} \
\nSize Download: %{size_download} \
\nSize Upload: %{size_upload} \
\nSSL Verify: %{ssl_verify_result} \
\nTime Handshake: %{time_appconnect} \
\nTime Connect: %{time_connect} \
\nName Lookup Time: %{time_namelookup} \
\nTime Pretransfer: %{time_pretransfer} \
\nTime Redirect: %{time_redirect} \
\nTime Start Transfer: %{time_starttransfer} \
\nTime Total: %{time_total} \
\nEffective URL: %{url_effective}\n" 2>&1

As demonstrated in the preceding example, cleaner results are achieved by denoting a new line with \n before each variable. Otherwise, all metrics are displayed together on a single line.


cURL helps review the HTTP response headers that influence caching. In particular, review several HTTP headers when troubleshooting ShopBase caching:


SSL/TLS certificates:

Reviewing Certificates with cURL: The following cURL command shows the SSL certificate served by ShopBase during an HTTPS request (replace with your domain and host name):

curl -svo /dev/null 2>&1 | egrep -v "^{.*$|^}.*$|^* http.*$"

2>&1 | egrep -v "^{.$|^}.$|^ http.*$" *cleans and parses the TLS handshake and certificate information.

To display the origin certificate (assuming one is installed), replace below with the actual IP address of your origin web server and replace with your domain and host name:

curl -svo /dev/null --connect-to :: 2>&1 | egrep -v "^{.*$|^}.*$|^* http.*$"

Testing TLS Versions: If troubleshooting browser support or confirming what TLS versions are supported, cURL allows you to test a specific TLS version by adding one of the following options to your cURL:


Related articles

Gather information for troubleshooting sites
Was this article helpful?
Thank you!