What Is a 303 Status Code?
The server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, which is intended to provide an indirect response to the original request.
A user agent can perform a retrieval request targeting that URI (a GET or HEAD request if using HTTP), which might also be redirected, and present the eventual result as an answer to the original request. Note that the new URI in the Location header field is not considered equivalent to the effective request URI.
This status code is applicable to any HTTP method. It is primarily used to allow the output of a POST action to redirect the user agent to a selected resource, since doing so provides the information corresponding to the POST response in a form that can be separately identified, bookmarked, and cached, independent of the original request.
A 303 response to a GET request indicates that the origin server does not have a representation of the target resource that can be transferred by the server over HTTP. However, the Location field value refers to a resource that is descriptive of the target resource, such that making a retrieval request on that other resource might result in a representation that is useful to recipients without implying that it represents the original target resource. Note that answers to the questions of what can be represented, what representations are adequate, and what might be a useful description are outside the scope of HTTP.
Except for responses to a HEAD request, the representation of a 303 response ought to contain a short hypertext note with a hyperlink to the same URI reference provided in the Location header field.
- Source: RFC7321 Section 6.4.4
303 CODE REFERENCES
Rails HTTP Status Symbol
Go HTTP Status Constant
Symfony HTTP Status Constant
Python2 HTTP Status Constant
Python3+ HTTP Status Constant
Python3.5+ HTTP Status Constant
Apache HttpComponents Core
303 status code example
Here’s an example of a request and response for a 303 status code:
GET /old-page HTTP/1.1
HTTP/1.1 303 See Other
In this example, the client is making a GET request to access an old page on the server. The server has since moved the page to a new location, and instead of returning the requested content with a 200 status code, it responds with a 303 See Other status code. The Location header in the response specifies the URL of the new location where the page can be found. The client can then make a new request to the new location to retrieve the requested content.
The 303 status code is typically used for redirections in which the server wants the client to use a different URL to access the requested resource, usually because the original URL has become invalid or outdated. Unlike a 301 or 302 redirect, a 303 redirect is designed to be used for HTTP GET requests only, and the client should always use the new URL when making subsequent requests to retrieve the resource.
How to fix a 303 status code
A 303 status code is not an error, but rather a response indicating that the requested resource has been moved to a new location and the client should make a new request to that location. Therefore, there is usually no need to “fix” a 303 status code.
However, if the client is not following the redirection and not making a new request to the new location, there may be a problem with the client application or configuration. Here are some potential solutions to this issue:
- Check the client application: Ensure that the client application is making the correct type of request (GET) and that it is following the redirect to the new location specified in the response’s Location header.
- Check the server configuration: Ensure that the server is correctly configured to handle redirects and is returning the correct status code (303 See Other) along with the Location header pointing to the new location.
- Clear the client cache: If the client is caching the original response, it may be necessary to clear the cache to force the client to make a new request to the new location.
In summary, a 303 status code is not an error, but rather a redirection response indicating that the requested resource has been moved to a new location. Any issues with following the redirection are typically related to the client application or configuration.
Does a 303 status code affect search engine optimization (SEO)?
In general, a 303 status code is unlikely to have a significant impact on SEO.
The main purpose of a 303 status code is to indicate to the client that the requested resource has been moved to a new location, and the client should make a new request to that location.
Unlike a 301 or 302 redirect, which are used for permanent and temporary redirects respectively and can affect SEO by transferring link equity and affecting indexing, a 303 status code is designed to be used for HTTP GET requests only, and the client should always use the new URL when making subsequent requests to retrieve the resource.
- Learn about web development
- Learn about SEO
- Web development services from WebFX
- SEO services from WebFX
- MDN Web Docs