Skip to main content
短.be

Response Code Negotiation

A design technique that dynamically selects the HTTP status code returned during redirects based on client type and request conditions.

Sep 10, 2026 · About 1 min read

Redirect

Response code negotiation is the process of selecting the appropriate HTTP status code for a redirect based on context, client capabilities, and SEO requirements. The choice between 301, 302, 307, and 308 status codes carries significant implications for caching, search indexing, and browser behavior. Google's documentation describes a permanent redirect as a signal that the destination should be the canonical URL, and states that a temporary redirect is not used as that signal. Separately, a 301 response is cacheable by default. 307/308 preserve the HTTP method across the redirect, critical for POST requests. URL shortening services can offer response code negotiation. A permanent redirect is chosen when the destination should be treated as canonical, while a temporary redirect is chosen when the short URL itself should remain in search results. API-driven redirects may require 307 to preserve POST data. Services should expose this choice to users while defaulting to sensible behavior.

Share on XHatena

Was this article helpful?

Related Terms

Related Articles

Put the terms to work

Shorten a URL for Free