302 Found
Fault: Neither
TL;DR
Resource temporarily moved but may return to original URL.
The resource temporarily resides at a different URL.
What HTTP 302 Found Means
The resource temporarily resides at a different URL.
Resource temporarily moved but may return to original URL.
Common Causes
- Temporary redirect
- A/B testing
- Maintenance mode redirect
How to Fix It (For Visitors)
- Browser should automatically redirect
How to Fix It (For Developers/Admins)
- Use 307 instead for temporary redirects that preserve method
- Set Location header
Returning a 302 Found (Code Examples)
If you build APIs or web apps, here is how to send an HTTP 302 response and how to test for it:
Node.js (Express)
app.get('/resource', (req, res) => {
res.status(302).json({ error: 'Found' });
});
Python (Flask)
@app.route('/resource')
def resource():
return jsonify(error='Found'), 302
PHP
<?php
http_response_code(302);
header('Content-Type: application/json');
echo json_encode(['error' => 'Found']);
Check the status with curl
curl -I https://example.com/resource
# Look for: HTTP/1.1 302 Found
Frequently Asked Questions
What does HTTP 302 Found mean?
Resource temporarily moved but may return to original URL. In short: The resource temporarily resides at a different URL.
How should I handle an HTTP 302 Found response?
Use 307 instead for temporary redirects that preserve method. Set Location header.
Official Specification
The 302 Found status code is defined in RFC 7231 Section 6.4.3.