let's say we have redirects like this:
(1) my shortener link -> (2) bit.ly -> (3) target URL
Is it possible to check on the end (3) that user visit came from (1) my shortened link?
Webmasters Stack Exchange is a question and answer site for webmasters. It only takes a minute to sign up.
Sign up to join this communityIs it possible to check on the end (3) that user visit came from (1) my shortened link?
No, because "(1) my shortened link" is not the referrer. The web page that contains "(1) my shortened link" is the referrer and it's this that is potentially*1 passed down the line by the browser.
For example:
Referer
.Location
header pointing to bit.ly
.bit.ly
, again setting Webpage-X as the Referer
, since it remembers that Webpage-X started this process to begin with.bit.ly
returns a 3xx redirect response to the browser with a Location
header pointing to the target-URL.Referer
, since it remembers...The server at target-URL only knows (potentially) that the request originated from Webpage-X that contained the original link. It does not know the nature of that link or the fact that several redirects occurred on the way to get there.
*1 I say potentially, since the Referrer-Policy at any redirect along the way could restrict how much of the referrer (Referer
header) gets passed on by the browser.
utm_*
parameters) to the final URL?