{"id":79,"date":"2026-10-28T05:57:54","date_gmt":"2026-10-28T05:57:54","guid":{"rendered":"https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/"},"modified":"2026-10-28T05:57:54","modified_gmt":"2026-10-28T05:57:54","slug":"test-website-with-curl-status-redirects-timing-tls","status":"publish","type":"post","link":"https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/","title":{"rendered":"How to Test a Website With curl: Status, Redirects, Timing, and TLS"},"content":{"rendered":"<p>When a website appears slow or unavailable, a browser can hide useful details behind a generic error page. The command-line tool <code>curl<\/code> lets you test the exact URL, inspect its HTTP response, follow redirects, measure connection stages, and verify TLS from the same machine where you are troubleshooting.<\/p>\n<h2>Start With the Status Code and Headers<\/h2>\n<p>A simple request such as <code>curl -I https:\/\/example.com\/<\/code> sends a HEAD request and displays response headers. Look for the HTTP status, <code>Location<\/code> on redirects, content type, caching headers, and the server date. Some applications do not handle HEAD correctly, so confirm suspicious results with a normal GET request.<\/p>\n<p>To download the response body while displaying headers, use <code>curl -i https:\/\/example.com\/<\/code>. If you only need the final status code, a script-friendly pattern is <code>curl -sS -o \/dev\/null -w '%{http_code}\\n' https:\/\/example.com\/<\/code>. Our guide to <a href=\"https:\/\/www.tempohosting.co.uk\/blog\/http-status-codes-explained-for-website-owners\/\" target=\"_blank\" rel=\"noopener\">HTTP status codes<\/a> explains what the main response classes mean.<\/p>\n<h2>Follow and Inspect Redirects<\/h2>\n<p>By default, curl reports a redirect but does not automatically request its destination. Add <code>-L<\/code> to follow redirects. Use <code>-I -L<\/code> for a quick view of the response chain, or include <code>-w '%{url_effective}\\n'<\/code> to print the final URL.<\/p>\n<p>Check for unexpected jumps between HTTP and HTTPS, repeated trailing-slash changes, or redirects to an old hostname. Limit automated checks with <code>--max-redirs<\/code> so a loop fails clearly instead of continuing through an excessive chain.<\/p>\n<h2>Test a Server Before Changing DNS<\/h2>\n<p>During a hosting migration, <code>--resolve<\/code> can direct a hostname and port to a chosen IP address without changing public DNS. For example, <code>curl --resolve example.com:443:192.0.2.10 https:\/\/example.com\/<\/code> connects to that address while still using the requested hostname for HTTP and TLS. This is safer and more representative than requesting an HTTPS site by IP alone.<\/p>\n<p>Use the option to compare old and new servers, confirm virtual-host routing, and test the certificate before switching an A or AAAA record. Remember that it changes name resolution only for that curl command; it does not reproduce every browser, resolver, or user-network condition.<\/p>\n<h2>Measure Where the Time Goes<\/h2>\n<p>The <code>--write-out<\/code> option can separate DNS lookup, connection, TLS, first-byte, and total time. For example, print selected measurements with <code>-w 'connect=%{time_connect} start=%{time_starttransfer} total=%{time_total}\\n'<\/code> while sending the body to <code>\/dev\/null<\/code>.<\/p>\n<p>A slow connection time can suggest network or routing trouble. A large gap before the first byte often points toward application processing, database work, or an upstream dependency. Compare several runs and test from more than one network before drawing conclusions. These command-line checks complement the broader approach in our article on <a href=\"https:\/\/www.tempohosting.co.uk\/blog\/website-monitoring-beyond-uptime-essential-checks\/\" target=\"_blank\" rel=\"noopener\">website monitoring beyond uptime<\/a>.<\/p>\n<h2>Test TLS and Specific Endpoints Safely<\/h2>\n<p>For HTTPS, curl verifies the hostname and certificate chain by default. Do not make <code>-k<\/code> or <code>--insecure<\/code> part of a normal monitoring command because it disables important verification. A certificate failure is valuable evidence, not an obstacle to hide.<\/p>\n<p>Test meaningful routes such as login, search, or a health endpoint, not only the homepage. Add <code>--connect-timeout<\/code> and <code>--max-time<\/code> so scripts stop predictably. Avoid placing passwords, tokens, or private cookies directly in shared shell history or monitoring output.<\/p>\n<p>The <a href=\"https:\/\/curl.se\/docs\/manpage.html\" target=\"_blank\" rel=\"noopener\">official curl command-line manual<\/a> documents the available options and all <code>--write-out<\/code> variables. A small set of repeatable curl commands can turn \u201cthe site feels slow\u201d into precise evidence about DNS, connection setup, TLS, HTTP behaviour, and application response time.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use curl to inspect website status codes, headers, redirects, connection timing, TLS verification, and a new server before changing DNS.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[25],"tags":[28,33,22,24,20],"class_list":["post-79","post","type-post","status-publish","format-standard","hentry","category-network-monitoring","tag-curl-command","tag-http-status-codes","tag-response-time-monitoring","tag-ssl-monitoring","tag-website-monitoring"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Test a Website With curl: Status, Redirects, Timing, and TLS - Tempo Hosting Blog<\/title>\n<meta name=\"description\" content=\"Use curl to test website status codes, headers, redirects, connection timing, TLS verification, and a new server before changing DNS.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Test a Website With curl: Status, Redirects, Timing, and TLS - Tempo Hosting Blog\" \/>\n<meta property=\"og:description\" content=\"Use curl to test website status codes, headers, redirects, connection timing, TLS verification, and a new server before changing DNS.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/\" \/>\n<meta property=\"og:site_name\" content=\"Tempo Hosting Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-28T05:57:54+00:00\" \/>\n<meta name=\"author\" content=\"Arthur Edward\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Arthur Edward\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/test-website-with-curl-status-redirects-timing-tls\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/test-website-with-curl-status-redirects-timing-tls\\\/\"},\"author\":{\"name\":\"Arthur Edward\",\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/0c5cdd8616ac5c6b1d288da7ec3dd903\"},\"headline\":\"How to Test a Website With curl: Status, Redirects, Timing, and TLS\",\"datePublished\":\"2026-10-28T05:57:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/test-website-with-curl-status-redirects-timing-tls\\\/\"},\"wordCount\":515,\"commentCount\":0,\"keywords\":[\"curl command\",\"HTTP status codes\",\"response time monitoring\",\"SSL monitoring\",\"website monitoring\"],\"articleSection\":[\"Network Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/test-website-with-curl-status-redirects-timing-tls\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/test-website-with-curl-status-redirects-timing-tls\\\/\",\"url\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/test-website-with-curl-status-redirects-timing-tls\\\/\",\"name\":\"How to Test a Website With curl: Status, Redirects, Timing, and TLS - Tempo Hosting Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/#website\"},\"datePublished\":\"2026-10-28T05:57:54+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/0c5cdd8616ac5c6b1d288da7ec3dd903\"},\"description\":\"Use curl to test website status codes, headers, redirects, connection timing, TLS verification, and a new server before changing DNS.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/test-website-with-curl-status-redirects-timing-tls\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/test-website-with-curl-status-redirects-timing-tls\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/test-website-with-curl-status-redirects-timing-tls\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Test a Website With curl: Status, Redirects, Timing, and TLS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/\",\"name\":\"Tempo Hosting Blog\",\"description\":\"Practical guides to web hosting, websites, domains and online success.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/#\\\/schema\\\/person\\\/0c5cdd8616ac5c6b1d288da7ec3dd903\",\"name\":\"Arthur Edward\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d305c187f77f40bd7f15259964168e8350a52598793dbb6c5ee98b63e767dada?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d305c187f77f40bd7f15259964168e8350a52598793dbb6c5ee98b63e767dada?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d305c187f77f40bd7f15259964168e8350a52598793dbb6c5ee98b63e767dada?s=96&d=mm&r=g\",\"caption\":\"Arthur Edward\"},\"url\":\"https:\\\/\\\/www.tempohosting.co.uk\\\/blog\\\/author\\\/arthur-edward\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Test a Website With curl: Status, Redirects, Timing, and TLS - Tempo Hosting Blog","description":"Use curl to test website status codes, headers, redirects, connection timing, TLS verification, and a new server before changing DNS.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/","og_locale":"en_US","og_type":"article","og_title":"How to Test a Website With curl: Status, Redirects, Timing, and TLS - Tempo Hosting Blog","og_description":"Use curl to test website status codes, headers, redirects, connection timing, TLS verification, and a new server before changing DNS.","og_url":"https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/","og_site_name":"Tempo Hosting Blog","article_published_time":"2026-10-28T05:57:54+00:00","author":"Arthur Edward","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Arthur Edward","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/#article","isPartOf":{"@id":"https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/"},"author":{"name":"Arthur Edward","@id":"https:\/\/www.tempohosting.co.uk\/blog\/#\/schema\/person\/0c5cdd8616ac5c6b1d288da7ec3dd903"},"headline":"How to Test a Website With curl: Status, Redirects, Timing, and TLS","datePublished":"2026-10-28T05:57:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/"},"wordCount":515,"commentCount":0,"keywords":["curl command","HTTP status codes","response time monitoring","SSL monitoring","website monitoring"],"articleSection":["Network Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/","url":"https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/","name":"How to Test a Website With curl: Status, Redirects, Timing, and TLS - Tempo Hosting Blog","isPartOf":{"@id":"https:\/\/www.tempohosting.co.uk\/blog\/#website"},"datePublished":"2026-10-28T05:57:54+00:00","author":{"@id":"https:\/\/www.tempohosting.co.uk\/blog\/#\/schema\/person\/0c5cdd8616ac5c6b1d288da7ec3dd903"},"description":"Use curl to test website status codes, headers, redirects, connection timing, TLS verification, and a new server before changing DNS.","breadcrumb":{"@id":"https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.tempohosting.co.uk\/blog\/test-website-with-curl-status-redirects-timing-tls\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.tempohosting.co.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Test a Website With curl: Status, Redirects, Timing, and TLS"}]},{"@type":"WebSite","@id":"https:\/\/www.tempohosting.co.uk\/blog\/#website","url":"https:\/\/www.tempohosting.co.uk\/blog\/","name":"Tempo Hosting Blog","description":"Practical guides to web hosting, websites, domains and online success.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.tempohosting.co.uk\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.tempohosting.co.uk\/blog\/#\/schema\/person\/0c5cdd8616ac5c6b1d288da7ec3dd903","name":"Arthur Edward","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d305c187f77f40bd7f15259964168e8350a52598793dbb6c5ee98b63e767dada?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d305c187f77f40bd7f15259964168e8350a52598793dbb6c5ee98b63e767dada?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d305c187f77f40bd7f15259964168e8350a52598793dbb6c5ee98b63e767dada?s=96&d=mm&r=g","caption":"Arthur Edward"},"url":"https:\/\/www.tempohosting.co.uk\/blog\/author\/arthur-edward\/"}]}},"_links":{"self":[{"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/posts\/79","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=79"}],"version-history":[{"count":0,"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/posts\/79\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=79"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=79"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tempohosting.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=79"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}