Hosting Operations
Read-onlyCheck HTTP to HTTPS Redirect
You need to confirm that plain HTTP redirects to HTTPS.
Command
curl -I http://example.com
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not follow redirects if you only need the first response; keep `-I` simple.
Expected output
A 301 or 308 redirect with a HTTPS Location header.
System impact
Read-only. Nothing changes. The command requests headers from HTTP.
Recovery / rollback: no state is changed.
When to use it
Use this after SSL setup, DNS changes, or Nginx redirect edits.
When not to use it
Do not follow redirects if you only need the first response; keep `-I` simple.
Watch this command run
Command transcript
This sanitized transcript shows the commands and output shape without exposing host details.
$ curl -I http://example.com
HTTP/1.1 301 Moved Permanently
Location: https://example.com/
$ curl -I https://example.com
HTTP/2 200
server: lab-nginx
x-content-type-options: nosniff
$ grep -R "server_name" /etc/nginx/sites-enabled/
/etc/nginx/sites-enabled/example.com: server_name example.com example.com;
View commands shown
These are the commands shown in the sanitized transcript.
Commands shown
curl -I http://example.comcurl -I https://example.comgrep -R "server_name" /etc/nginx/sites-enabled/
next steps
Related commands
Inspect Response Headers
The page loaded, but the headers told the operational story.
curl -sI https://example.com
Check the Current Release Symlink
The deploy finished. The symlink told me what was actually live.
readlink -f /srv/www/example.com/current
Check a Domain A Record
The site was fine. The domain was pointed somewhere else.
dig +short example.com A
Find Feed Links Missing from the Sitemap
Your feed can advertise URLs that the sitemap never lists.
grep -o '<link>https://example.com/[^<]*</link>' public/feed.xml | sed 's#<link>##;s#</link>##' | while read -r url; do grep -q "$url" public/sitemap.xml || echo "$url"; done
Find HTML Pages Missing from the Sitemap
A page can exist in the build but never make it into the sitemap.
find public -name '*.html' -print | sed 's#^public#https://example.com#' | while read -r url; do grep -q "$url" public/sitemap.xml || echo "$url"; done
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Useful for
- LPIC-1 style command-line practice
- LFCS style performance tasks
- Linux+ style troubleshooting review
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.