A “301 Moved permanently” redirect isn’t an error, but we want to give details about it. The goal of a 301
redirect is to redirect the client to the right URL. The target location may be a different file, a different folder, a
different domain, a different protocol (for
Consequently, the first response of a server is 301. Nevertheless, 301 redirects can be an issue under
EXAMPLE OF A 301 REDIRECT WITH CURL
In the following example, you can see the communication between the client and the server. The client sent
mentioning that the ultimate location of the page was https://tomydna.com , the client made a new request to
get https://tomydna.com, and the server provided the headers for https://tomydna.com and a successful delivery status 200 OK.
$ curl -v http://tomydna.com -I -L
* Rebuilt URL to: http://tomydna.com/
* Trying 85.17.26.201...
* TCP_NODELAY set
* Connected to tomydna.com (85.17.26.201) port 80 (#0)
> HEAD / HTTP/1.1
> Host: tomydna.com
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
HTTP/1.1 301 Moved Permanently
< Date: Thu, 21 Feb 2019 13:27:52 GMT
Date: Thu, 21 Feb 2019 13:27:52 GMT
< Server: Apache
Server: Apache
< Location: https://tomydna.com/
Location: https://tomydna.com/
< Cache-Control: max-age=0
Cache-Control: max-age=0
< Expires: Thu, 21 Feb 2019 13:27:52 GMT
Expires: Thu, 21 Feb 2019 13:27:52 GMT
< Content-Type: text/html; charset=iso-8859-1
Content-Type: text/html; charset=iso-8859-1
<
* Connection #0 to host tomydna.com left intact
* Issue another request to this URL: 'https://tomydna.com/'
* Trying 85.17.26.201...
* TCP_NODELAY set
* Connected to tomydna.com (85.17.26.201) port 443 (#1)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=tomydna.com
* start date: Jan 30 00:00:00 2019 GMT
* expire date: Apr 30 23:59:59 2019 GMT
* subjectAltName: host "tomydna.com" matched cert's "tomydna.com"
* issuer: C=US; ST=TX; L=Houston; O=cPanel, Inc.; CN=cPanel, Inc. Certification Authority
* SSL certificate verify ok.
> HEAD / HTTP/1.1
> Host: tomydna.com
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Date: Thu, 21 Feb 2019 13:27:52 GMT
Date: Thu, 21 Feb 2019 13:27:52 GMT
< Server: Apache
Server: Apache
< Link: <https://tomydna.com/wp-json/>; rel="https://api.w.org/", <https://wp.me/P9G7UU-d>; rel=shortlink
Link: <https://tomydna.com/wp-json/>; rel="https://api.w.org/", <https://wp.me/P9G7UU-d>; rel=shortlink
< Cache-Control: max-age=0
Cache-Control: max-age=0
< Expires: Thu, 21 Feb 2019 13:27:52 GMT
Expires: Thu, 21 Feb 2019 13:27:52 GMT
< Content-Type: text/html; charset=UTF-8
Content-Type: text/html; charset=UTF-8
<
* Connection #1 to host tomydna.com left intact
As you can see the 301 redirects add additional data exchange between the client and the server. When you multiply the number of exchanges by the number of requests a server receives from users and bots, it ends up in a considerable number of additional interactions. Additional requests stress the web server. That’s why it is better to keep a low amount of 301 redirects.