HTTP 497 HTTP Request Sent to HTTPS Port
Updated Free mock REST & WebSocket APIs
HTTP 497 HTTP Request Sent to HTTPS Port — nginx: a plain-HTTP request arrived on a port that expects HTTPS.
- Class
- 4xx Client Error
- Defined in
- Unofficial (nginx)
- Official
- No — nginx-specific
- Cacheable by default
- No (unless Cache-Control/Expires say so)
- Safe to retry
- Not without changing the request
Try it: get a real 497 response
Our test endpoint answers every request with 497 HTTP Request Sent to HTTPS Port.
curl -i https://mockfox.dev/api/status/497Use it in tests, health-check monitors or to see how your client handles a 497. Add ?delay=2000 to slow it down.
What does HTTP 497 mean?
Happens when something requests http://example.com:443. nginx shows 400 "The plain HTTP request was sent to HTTPS port". A neat fix is error_page 497 =301 https://$host$request_uri; to redirect such requests to HTTPS.
How to fix 497
- Visitors: Reload the page, check the address for typos, and clear the site's cookies. If it persists, the site owner needs to fix it.
- Developers: Read the response body and server logs for details, fix the request (method, headers, body, credentials) and return a clear error message to clients.
Example 497 response
HTTP/1.1 400 Bad Request Server: nginx Content-Type: text/html # (logged internally as 497)
4xx Client Error: The request contains an error or can't be fulfilled — fix the request before retrying. See the full list of HTTP status codes.
Related status codes
- 400 Bad RequestThe server can't process the request because it's malformed or invalid.
- 301 Moved PermanentlyThe resource has a new permanent URL, given in the Location header.
- 426 Upgrade RequiredThe server refuses to handle the request over the current protocol; the Upgrade header names the required one.
Related tools
Frequently asked questions
What does HTTP 497 HTTP Request Sent to HTTPS Port mean?
nginx: a plain-HTTP request arrived on a port that expects HTTPS.
Is 497 a client or a server error?
497 is a 4xx code, so it signals a problem with the request (as seen by the server). Retrying the identical request usually gives the same result.
Is 497 an official HTTP status code?
No. It isn't in the IANA HTTP Status Code Registry; it's specific to nginx. Generic HTTP clients treat it as an unknown 4xx status.
How can I test how my app handles a 497?
Call https://mockfox.dev/api/status/497 — it responds with 497 to any method, with CORS enabled. Add ?delay=2000 to simulate a slow response.