httphttp-redirecthttp-status-code-301http-status-code-302

HTTP redirect: 301 (permanent) vs. 302 (temporary)


Is the client supposed to behave differently? How?


Solution

  • Status 301 means that the resource (page) is moved permanently to a new location. The client/browser should not attempt to request the original location but use the new location from now on.

    Status 302 means that the resource is temporarily located somewhere else, and the client/browser should continue requesting the original url.