What is the 200 (OK) Response Code?
Il codice di risposta 200 OK è un codice di risposta di stato HTTP che indica che la tua richiesta ha avuto successo. Tuttavia, il significato di "riuscito" varia a seconda del tipo di metodo di richiesta HTTP utilizzato.
- OTTENERE: Ciò indica che la risorsa richiesta è stata recuperata ed è inclusa nel corpo della risposta
- TESTA: Ciò mostra che le intestazioni delle risorse sono incluse nella risposta. Tuttavia, il corpo della risorsa non è incluso
- INVIARE: This indicates the request you sent has been succeeded
- TRACCIA: Questa risposta contiene la richiesta ricevuta dal server
You will not physically encounter the HTTP 200 OK response code if you access the Internet using a regular browser. However, you can see it when you inspect a URL using an HTTP status checker tool.
That said, the 200 (OK) response code belongs to the 2xx series of response codes:
2
indica che il server ha elaborato con successo la richiesta e sta inviando una risposta "riuscita" al clientxx
viene sostituito con due numeri a seconda l'esito o lo stato della richiesta HTTP
Why the 200 (OK) Response Code is Important for SEO
The 200 (OK) response code indicates visitors and search engine crawlers can access your webpages. It typically means everything works as it should, and you have nothing to worry about.
The 200 (OK) response code is the most desired HTTP code. It is the HTTP code you want your pages to return whenever a visitor or search engine tries accessing them. This allows crawlers to crawl your pages and index them for display in search results. Similarly, visitors can access the page without issues.
Why Your URL May Return a 301 Moved Permanently Before a HTTP 200
If you inspect your URL using an HTTP status checker tool, you may encounter situations where your URL returns an HTTP 301 Moved Permanently before returning an HTTP 200 OK response code.
This happens when a server has been configured to redirect the client to a different URL. In this case, the server has been configured to redirect visitors and search crawlers from the unsecured version of the site, http://rankmath.com, to the secure version of the site, https://rankmath.com.
So, when the client requests to access the URL at the unsecured version of the site, the server returns with an HTTP 301 response code containing the URL the client should visit instead.
The client then requests the new URL, and the server returns with a 200 OK response code indicating the request was successful.
It’s important to note that browsers handle this redirection automatically. So, you will only notice a redirection if you pay attention to the URL you clicked or entered into the address bar and the URL displayed after the page completes loading.
For example, this is the URL we entered into the address bar. Notice it begins with http and not https.
This is the URL displayed after the redirection has occurred. We were redirected from the http version of the site to the https version.
Overall, the HTTP 301 to HTP 200 redirection is nothing to worry about. It only indicates that your redirection is working as it should. However, it is best practice to use a minimal number of 301 redirects in your URLs, as too many 301 redirections will lead to a redirect chain.
Also, when linking to the page, it is best practice to link directly to the URL that returns the 200 OK response code rather than linking to the one that returns the 301 and then the 200 response code.
Domande frequenti
What is the Difference Between 200 and 201 Responses?
The 200 and 201 response codes both indicate that the request was successful. However, the 201 response is returned when one or more new resources are created due to the request. The 201 response code is also called the 201 Created.