Follow redirect chains from a bare page
A bare landing page often shows only “Click here to proceed”, with no visible company name, destination, or explanation. The real target may sit in an HTML link, a JavaScript event, or an opaque query parameter. Your browser normally displays the address you entered, not every address it visits, so the apparent simplicity can hide a multi-step route.
Command-line tools expose that route one response at a time. They can show status codes, Location headers, the effective final URL, redirect counts, DNS results, and TLS errors. This makes them useful for checking whether a link works, documenting a referral path, or spotting a destination that differs from what the page implies.
The same visibility supports safer investigation. Inspecting a chain does not make the destination trustworthy, so keep limits on time and redirects, avoid executing downloaded code, and never disable certificate checks merely to make a request succeed. The goal is evidence about the route, not an automatic decision to open it.
Start with the generic page, preserve its exact URL, and work through the same repeatable sequence: capture the source, recover any embedded target, follow each hop, and verify the final host. The examples use Unix-like shells; the Australian-specific notes later cover Windows, WSL, network conditions, and local reporting habits.
Inspect the first response
Fetch the landing page without following redirects. Keeping the query string is essential because the obfuscated parameter may be the only clue to the destination. On a page such as the starting homepage, put the complete address in single quotes:
curl -sS --connect-timeout 5 --max-time 20 \
-D first-headers.txt -o page.html 'PASTE_THE_EXACT_URL'
The status line in first-headers.txt should begin with something such as HTTP/2 200. A 301, 302, 303, 307, or 308 response includes a Location header describing the next address. Because this command omits -L, curl stops after the first response even if the server requests a redirect.
The saved HTML may contain the real destination in a hidden attribute or script. Search it with grep -inE 'click here|href|location|https?://' page.html. A quick comparison of common choices helps you choose the right tool:
| Tool | Strongest use | Typical invocation | Important limitation |
|---|---|---|---|
| curl | Controlled tracing and formatted output | curl -sS -L URL |
Requires care with quoting and redirect limits |
| wget | Clear server-response logging | wget --server-response URL |
May download the final body by default |
| httpx | Structured scanning of multiple URLs | httpx -u URL -follow-redirects |
Must be installed separately |
Whichever tool you use, preserve the original response headers before making another request. They establish what the first server actually instructed your browser to do.
Recover the embedded destination
An HTML parser can extract every anchor without confusing surrounding markup for a link. The following works with Python 3 and does not need an external package:
python3 - <<'PY'
from html.parser import HTMLParser
class LinkFinder(HTMLParser):
def handle_starttag(self, tag, attrs):
if tag == "a":
href = dict(attrs).get("href")
if href:
print(href)
with open("page.html", encoding="utf-8", errors="replace") as source:
LinkFinder().feed(source.read())
PY
If the anchor contains a relative path, combine it with the page address before testing it. Query parameters may also use percent encoding, nested encoding, or base64. Python’s parse_qs function decodes ordinary query-string values:
python3 - <<'PY'
from urllib.parse import parse_qs, urlsplit
url = urlsplit("PASTE_THE_EXACT_URL")
for key, values in parse_qs(url.query).items():
print(key, "=", values[0])
PY
A value that resembles base64 can be tested separately, but a decoded string is not automatically trustworthy. Even if it points to something like the work section, check the complete hostname and confirm that the decoded route matches the service you intended to reach. Encrypted or application-generated parameters cannot be decoded safely without the site’s own logic.
Follow every hop with curl
Once the first destination is known, let curl follow the chain while retaining strict limits. Redirecting only to HTTP and HTTPS prevents a malformed link from invoking another protocol, while --max-redirs stops an endless loop.
curl -sS -L --max-redirs 10 --proto-redir '=http,https' \
--connect-timeout 5 --max-time 30 \
-D hop-headers.txt -o /dev/null \
-w 'final=%{url_effective}\nstatus=%{http_code}\nredirects=%{num_redirects}\n' \
'PASTE_THE_EXACT_URL'
The saved headers contain the status and Location value from each response. Extract a compact route with grep -iE '^(HTTP/|location:)' hop-headers.txt. The final URL may differ from the last visible Location value when that header is relative.
Run the same test against a second page, such as the travel page, only as a control for comparing tool behaviour. A HEAD request can be quicker, but some servers handle it differently from GET; confirm important findings with the same method used by the browser.
Compare wget and specialised tools
Wget provides a readable server-response trace and is already available on many macOS and Linux systems. Its spider mode checks the route without retaining the destination body:
wget --server-response --spider --max-redirect=10 \
--timeout=15 'PASTE_THE_EXACT_URL'
A server may answer the initial check with 405 Method Not Allowed, causing wget to try another request. That difference is useful information about the site, but it means a spider result should not automatically be treated as identical to a browser visit.
If httpx is already installed through a trusted software source, it can present status, location, and the redirect chain in a compact format:
httpx -u 'PASTE_THE_EXACT_URL' -follow-redirects \
-max-redirects 10 -status-code -location -chain
Use a separate control, such as the reference homepage, when your security policy permits visiting it. Compare the two outputs rather than assuming that a short chain is safe. Also distinguish permanent redirects such as 301 and 308 from temporary ones such as 302, 303, and 307; the status alone does not establish whether the destination is legitimate.
Decode names and check the network
DNS helps explain why one hop fails while another succeeds. Resolve each hostname separately and compare the returned addresses:
dig +short HOSTNAME
nslookup HOSTNAME
The addresses may belong to a content-delivery network and can change between lookups. A successful lookup also does not prove that the service is trustworthy; it only confirms where the name currently points.
Relative redirect paths can be resolved with urljoin. Replace both values with the ones found in the headers:
python3 - <<'PY'
from urllib.parse import urljoin
print(urljoin("https://example.invalid/start", "/next?x=1"))
PY
Finally, run curl -v --max-time 15 'PASTE_THE_EXACT_URL' to expose the negotiated host, certificate information, proxy settings, and connection errors. Redact credentials before sharing the output. Review every hostname in the chain, especially any downgrade from HTTPS to HTTP or unexpected change to a different domain.
Account for Australian conditions
Many Australian workplace laptops run Windows. In Windows PowerShell, curl can resolve to the Invoke-WebRequest alias rather than the native executable, so use curl.exe or check the result of Get-Command curl. Windows Subsystem for Linux provides the Unix commands used throughout this guide without changing the examples.
Australian internet access combines NBN services, fixed wireless, and mobile connections. A timeout from a Perth office or a regional property may reflect the route to a Sydney- or Melbourne-hosted service rather than a broken redirect. Mobile data can also introduce an extra transition between networks, so repeat a failed request before treating it as a server fault.
Server logs commonly use UTC, while Sydney changes offset for daylight saving and Perth does not. Convert timestamps with date -u, TZ=Australia/Sydney date, and TZ=Australia/Perth date. Adelaide sits on a half-hour offset from Perth, another easy detail to overlook when matching an Australian incident report to an overseas log.
Australian workplace conversations often include “no worries” or “she’ll be right”, but a useful technical record needs the exact URL, status codes, and timestamps. Public Wi-Fi in a Melbourne café or a Sydney airport lounge also introduces local-network risk; avoid entering credentials into a chain you have not inspected, and prefer a trusted connection or mobile hotspot when the destination is uncertain.
Run the final safety check
Run the bounded trace now on the exact address you received. On Windows, replace the first curl with curl.exe:
curl -sS -L --max-redirs 10 --proto-redir '=http,https' \
--connect-timeout 5 --max-time 20 -o /dev/null \
-w 'final_url=%{url_effective}\nstatus=%{http_code}\nredirects=%{num_redirects}\n' \
'PASTE_THE_EXACT_URL'
Save the output with the original URL and the time you ran it. If the route needs a detailed record, add -D hop-headers.txt and preserve that file alongside the formatted results. Share only the necessary hostnames and timestamps when reporting the issue.
Open the final destination only when its scheme, hostname, and path match the service you expected. Keep the bare page closed when they do not, and pass the recorded chain to the site owner or your security team. This creates a clear, repeatable answer before any click-through decision is made.