¡Aprende más!

What is the 200 (OK) Response Code?

El código de respuesta 200 OK es un código de respuesta de estado HTTP que indica que su solicitud fue exitosa. Sin embargo, el significado de "exitoso" difiere según el tipo de método de solicitud HTTP utilizado. 

  • CONSEGUIR: Esto indica que el recurso solicitado se ha obtenido y está incluido en el cuerpo de la respuesta.
  • CABEZA: Esto muestra que los encabezados de recursos están incluidos en la respuesta. Sin embargo, el cuerpo del recurso no está incluido.
  • CORREO: This indicates the request you sent has been succeeded
  • RASTRO: Esta respuesta contiene la solicitud recibida por el servidor.

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.

Sample of a HTTP status checker tool showing the 200 OK Response Code

That said, the 200 (OK) response code belongs to the 2xx series of response codes:

  • 2 indica que el servidor procesó exitosamente la solicitud y está enviando una respuesta "exitosa" al cliente
  • xx se reemplaza con dos números dependiendo de el resultado o estado de la solicitud 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.

Sample of a site returning a 301 Moved Permanently displays before the HTTP 200

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.

Example of the URL entered into the address bar

This is the URL displayed after the redirection has occurred. We were redirected from the http version of the site to the https version.

Example of the URL displayed after the redirection

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.

Preguntas frecuentes

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.

🇪🇸 Español