OfferProbe

How to check where a link redirects

The address you see on a link is only where it starts. It can pass through several more before it stops, and the stops can differ from one visitor to the next. Here are four ways to follow a link to the end, what each one shows and where each one goes blind.

Updated

In short

  • The quickest way is a redirect checker that opens the link in a real browser: it lists every hop and the final page, and nothing opens on your device.
  • On your own machine, curl -sIL prints each HTTP redirect, and the browser’s Network tab with Preserve log on also shows the hops made by a script or a tag.
  • Anything run from your own connection shows the path for your country and your device. Many links send other visitors somewhere else.

Skip to the check

The example: one real link, three redirects

Every method on this page is shown on one real link, so you can repeat each step and compare what you get. It is the address of this site’s redirect checker typed the long way: without https, with www and with a slash at the end.

A real link, followed3 redirects
  1. http://www.offerprobe.com/redirect-checker/

    ↓ to https

  2. https://www.offerprobe.com/redirect-checker/

    ↓ to the name without www

  3. https://offerprobe.com/redirect-checker/

    ↓ trailing slash dropped

  4. https://offerprobe.com/redirect-checker

    The page

Three redirects, each for its own reason, before the page loads. Here is the link itself, to hover over, copy or paste: http://www.offerprobe.com/redirect-checker/

The four kinds of redirect

A redirect is an instruction to go somewhere else. There are four ways to give one, and the difference matters here because not every tool can see all four.

KindHow it sends the visitor onSeen by
HTTP redirectThe server answers with a status code (301, 302, 303, 307 or 308) and a Location header naming the next address.Every tool
Meta refreshThe page loads, and a tag in its HTML tells the browser to load another address, often after zero seconds.Tools that read the page
JavaScriptThe page loads, and a script changes the address.Only a browser that runs the script
App hand-offThe last hop opens an app or its store page instead of a web page.Only a browser on the phone it is meant for

Of the status codes, 301 and 308 say the move is permanent; 302, 303 and 307 say it is temporary. A tool that reads only headers stops at the first page that answers 200. If that page sends the visitor on a second later, by a tag or a script, the tool reports the wrong ending and nothing tells you so.

The example link uses only the first kind, which is why every method below can follow it to the end. A link that hops by a script or a tag is where they part ways.

1. Read the address before you click

On a computer, rest the pointer on the link: the browser shows its address in the bottom corner of the window. On a phone, press and hold the link for a preview of the address.

This costs nothing and catches the crude case, a link that names one site and points at another.

On the example it shows http://www.offerprobe.com/redirect-checker/ and nothing of the three stops after it.

2. Watch it in your browser’s developer tools

Your browser already records every address a tab loads. Chrome, Edge, Firefox and Safari all have the same panel.

  1. Open a new tab and open the developer tools: F12 on Windows and Linux, Cmd + Option + I on a Mac. In Safari, turn on the developer features under Settings, Advanced first.
  2. Go to the Network tab and tick Preserve log (Firefox calls it Persist Logs, under the gear). Without it the list is wiped at every hop.
  3. Paste the link into the address bar and press Enter.
  4. Filter the list to Doc (HTML in Firefox). Each row is one address the tab loaded, in order.
  5. Click a row with status 301, 302, 307 or 308 and read Location under Response Headers: that is where the server sent you. A row with status 200 followed by another row is a page that moved the browser itself, by a script or a meta refresh.

The example link gives four rows:

StatusAddress the tab loaded
307 or 308http://www.offerprobe.com/redirect-checker/Sent on to https
301https://www.offerprobe.com/redirect-checker/Sent on to the name without www
301https://offerprobe.com/redirect-checker/Sent on without the trailing slash
200https://offerprobe.com/redirect-checkerThe page

Chrome usually shows the first row as 307 Internal Redirect, not the server’s 308: it switches the address to https by itself, without asking the server. So even the status of a hop can depend on who is asking.

Extensions that show a tab’s redirect path put the same list one click away, with the same limits.

3. Follow it with curl

curl asks for an address and prints what the server answered, without rendering anything. It ships with macOS, Linux and Windows 10 and later (in PowerShell, type curl.exe).

curl -sIL http://www.offerprobe.com/redirect-checker/

-I asks for the headers only, -L follows each Location header to the next address, and -s hides the progress meter. The output is one block of headers per hop. Read the status line and the location line of each:

What it prints for the example, other headers left out
HTTP/1.1 308 Permanent Redirect
Location: https://www.offerprobe.com/redirect-checker/

HTTP/2 301
location: https://offerprobe.com/redirect-checker/

HTTP/2 301
location: /redirect-checker

HTTP/2 200

Three redirects and then the page. The last location is a path, not a full address: a redirect may name a place on the same site, and the tool fills in the rest.

To get the final address alone:

curl -sLo /dev/null -w '%{url_effective}\n' http://www.offerprobe.com/redirect-checker/

It prints https://offerprobe.com/redirect-checker. -o /dev/null throws the page away (on Windows, write NUL in its place) and -w prints what you ask for; add %{num_redirects} inside the quotes for the number of redirects.

Two things to know. -I sends a HEAD request, and a few servers answer that differently from a normal visit; the second command sends an ordinary GET, so trust it when the two disagree. And a server may send a phone somewhere else than a computer: add -A with a phone’s user agent string to ask as one.

4. Use a redirect checker

An online redirect checker follows the link for you from its own server. There are two kinds, and what separates them is the table at the top of this page.

  • Header checkers do what curl does: one request per hop, following Location headers, from a datacenter. They are fast, and blind to scripts, tags and app hand-offs.
  • Browser checkers open the link in a real browser and record every address it loads, whatever caused the hop.

OfferProbe’s redirect checker is the second kind. It opens the link in a real browser, from a residential or mobile connection in the country you choose and on the device you choose, and lists each hop with its address, its status code and what caused it: a header, a script, a meta refresh or a deep link. The link opens in our browser, not on your device. The check is free; when the result is ready, a free account opens it.

Run on the example from a connection in the United States, it lists the same three hops, the first as a 307 as in Chrome, and ends on https://offerprobe.com/redirect-checker. Paste the link into the form at the end of this page to see it.

What each method shows

MethodHTTP redirectsScript and meta redirectsAnother countryAnother deviceKeeps the link off your device
Hover or previewFirst address onlyNoNoNoYes
Developer toolsYesYesNoScreen and user agent onlyNo
curlYesNoNoUser agent onlyYes
Header checkerYesNoRarelyUser agent, on someYes
Browser checker (OfferProbe)YesYesYesYesYes

Why the same link ends in different places

A redirect is decided when the request arrives, and the server can look at who is asking. So one link can have many endings:

  • Country. A geo-targeted link sends each country to its own page and everyone else to a fallback.
  • Device. A link to an app sends an iPhone to the App Store, an Android phone to Google Play and a computer to a web page.
  • Connection. Some offers accept only visitors on a mobile carrier’s network and turn Wi-Fi visitors away.
  • First visit or not. A link can treat a returning visitor differently from a new one.
  • Who looks like a bot. Requests from datacenter addresses and scripted browsers are often shown a different page from the one real visitors get. This is cloaking, and it is why a checker run from a server can report a page no visitor ever sees.

So “where does this link go” has an answer per visitor. If the visitor you care about is not you, check as them: from their country, on their kind of device and connection, and if you suspect the link hides its real page from checkers, with a cloaking check.

What to look for in the chain

  • A domain you do not recognise in the middle. Every hop is a party that sees the click. For a link you were sent, an unexpected domain is the reason to stop; for your own link, it is a partner you should be able to name.
  • A hop that drops the query string. Tracking parameters ride in the part after the question mark. If a hop leaves them behind, the click arrives without its source and is credited to nobody.
  • A 302 where the move is permanent. Search engines treat a 301 or 308 as a change of address and a 302 as a detour, so a permanent move should say so.
  • An http:// hop in an https:// chain. One unencrypted hop shows the address, and everything in it, to the network in between.
  • Too many hops. Each one is another round trip before the page starts to load. Google’s crawlers follow up to 10 and browsers stop at about 20; the fix is to point the first address straight at the last.

Questions

How do I see where a link goes without opening it?

Paste it into a redirect checker, or run curl -sIL followed by the link in a terminal. Neither loads the page on your device. Hovering over the link shows only its first address, not where it ends.

Why does curl show fewer redirects than my browser?

curl follows only HTTP redirects, the ones a server sends with a 3xx status code and a Location header. A browser also follows redirects made by JavaScript or by a meta refresh tag inside a page, so its chain can be longer and end somewhere else.

Can the same link go to different places for different people?

Yes. The server decides each redirect when the request arrives, and it can use the visitor’s country, device, connection and whether they have been there before. To see what someone else gets, check from their country and device, not your own.

Does a redirect checker tell me whether a link is safe?

It tells you where the link ends and what it passes through, which is often enough to recognise a scam: the final domain is not the one the message claimed. It does not scan the final page for malware; a URL scanner does that.

How many redirects are too many?

One is best. Every hop adds a round trip before the page starts to load. Google’s crawlers follow up to 10 hops, and browsers stop at about 20 with a “too many redirects” error.

Check a link now

Paste a link. A real browser opens it from the country and device you choose and reports every redirect on the way: status codes, JavaScript and meta refreshes, and the app-store hand-off at the end.

Free to run, no account needed; a free account opens the result. A paid plan adds screenshots, skip-visits and batches.

Geo redirects fire for this country. Change it to see the path another audience gets.

best effort

Pick a country first to see its carriers.

Loading the device list…