{"id":16092,"date":"2025-07-24T17:21:18","date_gmt":"2025-07-24T15:21:18","guid":{"rendered":"https:\/\/surver.nl\/?post_type=kennisbank&#038;p=16092"},"modified":"2025-08-21T12:46:56","modified_gmt":"2025-08-21T10:46:56","slug":"status-code-307","status":"publish","type":"kennisbank","link":"https:\/\/surver.nl\/en\/kennisbank\/statuscode-307\/","title":{"rendered":"What does status code 307 Temporary Redirect mean?"},"content":{"rendered":"<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"1024\" src=\"https:\/\/surver.nl\/wp-content\/uploads\/2025\/07\/b62f1bcc-c790-45ca-a8ce-9b73879cc18c-1.png\" alt=\"307 Temporary Redirect\" class=\"wp-image-16374\" srcset=\"https:\/\/surver.nl\/wp-content\/uploads\/2025\/07\/b62f1bcc-c790-45ca-a8ce-9b73879cc18c-1.png 1024w, https:\/\/surver.nl\/wp-content\/uploads\/2025\/07\/b62f1bcc-c790-45ca-a8ce-9b73879cc18c-1-300x300.png 300w, https:\/\/surver.nl\/wp-content\/uploads\/2025\/07\/b62f1bcc-c790-45ca-a8ce-9b73879cc18c-1-150x150.png 150w, https:\/\/surver.nl\/wp-content\/uploads\/2025\/07\/b62f1bcc-c790-45ca-a8ce-9b73879cc18c-1-768x768.png 768w, https:\/\/surver.nl\/wp-content\/uploads\/2025\/07\/b62f1bcc-c790-45ca-a8ce-9b73879cc18c-1-12x12.png 12w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Most redirects work the same way on the face of it. You request a page, get redirected, and the browser does what's needed. But under the hood there is a difference. Especially when it comes to the HTTP method.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Status code 307 is for situations where you want to forward a request, but want the original method and content of the request to remain as they are. So no POST that turns into a GET. No empty body being lost. Just the same action, but in a different place.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why not just 302?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">That's exactly the point. 302 was never designed to preserve methods. In practice, some clients did, others didn't. Result: inconsistent behavior, depending on the browser or library.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">307 is the tighter, more correct successor. It makes no assumptions. What comes in as POST, goes out as POST. The same for PUT, DELETE or PATCH. That makes it suitable for modern applications where reliability counts.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">When do you use a 307 redirect?<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"502\" src=\"https:\/\/surver.nl\/wp-content\/uploads\/2025\/07\/307-TEMPORARY-REDIRECT-1024x502.jpeg\" alt=\"307 Temporary Redirect\" class=\"wp-image-16094\" srcset=\"https:\/\/surver.nl\/wp-content\/uploads\/2025\/07\/307-TEMPORARY-REDIRECT-1024x502.jpeg 1024w, https:\/\/surver.nl\/wp-content\/uploads\/2025\/07\/307-TEMPORARY-REDIRECT-300x147.jpeg 300w, https:\/\/surver.nl\/wp-content\/uploads\/2025\/07\/307-TEMPORARY-REDIRECT-768x376.jpeg 768w, https:\/\/surver.nl\/wp-content\/uploads\/2025\/07\/307-TEMPORARY-REDIRECT-1536x752.jpeg 1536w, https:\/\/surver.nl\/wp-content\/uploads\/2025\/07\/307-TEMPORARY-REDIRECT-18x9.jpeg 18w, https:\/\/surver.nl\/wp-content\/uploads\/2025\/07\/307-TEMPORARY-REDIRECT.jpeg 1678w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Consider an API that temporarily runs through a different endpoint. Or a form processing that gets moved without your users noticing. You want everything to continue exactly the same, just through a different path.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Important: It is a temporary detour. If the move is permanent, look at <strong>308<\/strong>. But for anything of a temporary nature, where method retention is crucial, you're stuck with <strong>307<\/strong> good.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What happens technically?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A client sends a POST to \/process. The server responds with:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>HTTP\/1.1 307 Temporary Redirect&nbsp;&nbsp;<\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>Location:\/temporary-endpoint<\/em><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The client is required to execute that same POST request again, but this time to the specified address. No conversion to GET, no additional prompts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In tools like curl, you see it happen immediately. Also in browser developer tools, you'll neatly see two requests: the original one, and the one forwarded using the same method.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why would you need to know this?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Because a wrong redirect can do invisible damage. Your API seems to work, but POST data disappears along the way. Or your form processing fails because the method has suddenly changed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you're managing routing, reverse proxies or temporary API paths, you want this to be right. And that means using 307 if you combine temporary logic with a strict method requirement.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Closing<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>307 redirect<\/strong> is not a replacement for 302. It is a correction. An explicit choice for consistency in behavior, especially in POST-driven systems.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you use it properly, the user won't notice anything. But you know that the underlying structure remains reliable, and that's what counts. For forms, APIs and Web shops, this is a typical scenario in which good <a href=\"https:\/\/surver.nl\/en\/managed-hosting\/wordpress\/\">WordPress Hosting<\/a>, <a href=\"https:\/\/surver.nl\/en\/managed-hosting\/woocommerce\/\">WooCommerce Hosting<\/a> and scalable <a href=\"https:\/\/surver.nl\/en\/managed-hosting\/cloud\/\">Cloud Hosting<\/a> really make a difference.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>","protected":false},"excerpt":{"rendered":"<p>De meeste redirects werken op het oog hetzelfde. Je vraagt een pagina aan, wordt omgeleid, en de browser doet wat nodig is. Maar onder de motorkap zit verschil. Vooral als het om de HTTP-methode gaat. Statuscode 307 is er voor situaties waarin je een verzoek wilt doorsturen, maar w\u00e9l wilt dat de oorspronkelijke methode en [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":16374,"template":"","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}}},"kennisbank_categorieen":[64],"class_list":["post-16092","kennisbank","type-kennisbank","status-publish","has-post-thumbnail","hentry","kennisbank_categorieen-statuscodes"],"acf":[],"_links":{"self":[{"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/kennisbank\/16092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/kennisbank"}],"about":[{"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/types\/kennisbank"}],"author":[{"embeddable":true,"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/users\/2"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/media\/16374"}],"wp:attachment":[{"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/media?parent=16092"}],"wp:term":[{"taxonomy":"kennisbank_categorieen","embeddable":true,"href":"https:\/\/surver.nl\/en\/wp-json\/wp\/v2\/kennisbank_categorieen?post=16092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}