Double redirect - referrer in headers

Double redirect - referrer in headers - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Double redirect - referrer in headers error on your web browser. Problem :


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?


Solution :


Is 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:



  1. Webpage-X contains "my-shortener-link" (that is on Domain-A)

  2. User clicks on "my-shortener-link" and the browser sends a request to Domain-A. The browser sets Webpage-X as the Referer.

  3. Domain-A returns a 3xx redirect response to the browser with a Location header pointing to bit.ly.

  4. The browser sends a request to bit.ly, again setting Webpage-X as the Referer, since it remembers that Webpage-X started this process to begin with.

  5. bit.ly returns a 3xx redirect response to the browser with a Location header pointing to the target-URL.

  6. The browser sends a request to the target-URL, again setting Webpage-X as the 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.


We hope that this article has helped you resolve the google-analytics, redirects, http-headers error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=