HTTP 301 Moved Permanently vs 422 Unprocessable Content
HTTP 301 (Moved Permanently) is a 3xx Redirection response, while 422 (Unprocessable Content) is a 4xx Client Error response. 301 indicates that the resource has been permanently moved to a new URL. All future requests should use the new URL. Search engines will transfer link equity to the new URL. In contrast, 422 means that the server understands the content type and syntax, but was unable to process the contained instructions. Common in API validation errors.
Description
The resource has been permanently moved to a new URL. All future requests should use the new URL. Search engines will transfer link equity to the new URL.
When You See It
After domain migrations, URL restructuring, or when consolidating duplicate URLs.
How to Fix
Update links and bookmarks to the new URL in the Location header. For SEO, this is the preferred redirect for permanent moves.
Description
The server understands the content type and syntax, but was unable to process the contained instructions. Common in API validation errors.
When You See It
When form validation fails — correct syntax but invalid data (e.g., email format wrong, date in the past).
How to Fix
Check the response body for specific validation errors and correct the input data.
Key Differences
301 is a 3xx Redirection response, while 422 is a 4xx Client Error response.
HTTP 301: The resource has been permanently moved to a new URL. All future requests should use the new URL. Search engines will transfer link equity to the new URL.
HTTP 422: The server understands the content type and syntax, but was unable to process the contained instructions. Common in API validation errors.
You encounter 301 when after domain migrations, URL restructuring, or when consolidating duplicate URLs.
You encounter 422 when when form validation fails — correct syntax but invalid data (e.g., email format wrong, date in the past).
When to Use Which
For 301 (Moved Permanently): Update links and bookmarks to the new URL in the Location header. For SEO, this is the preferred redirect for permanent moves. For 422 (Unprocessable Content): Check the response body for specific validation errors and correct the input data.