Redirects

Redirects are an important part of any website. They help users to automatically end up at the correct content if a web resource is moved to another location or protocol.

Redirects come in two flavors; 301 and 302. 301 means “Moved Permanently” and should be used when a resource is permanently moved (this is usually what you’d like to use). 302’s mean “Moved Temporarily”, which indicates that the change is not permanent.

Redirects are sent in HTTP headers, which can be made or manipulated by webservers. Therefore, redirects can be made both in Cloudflare, the Servebolt Control Panel (which controls nginx) and in the Apache webserver’s configuration file called .htaccess.

In addition, redirects can also be produced by your web application, for example WordPress, by plugins like Yoast SEO Premium or Redirection.

Performance of Redirects

In general, redirects are faster (make shorter delays for users) the closer they are to the user. That means that if you’re using Cloudflare, the most efficient way to redirect is to do it with for example page rules on Cloudflare.

Cloudflare > Nginx > .htaccess > WordPress

Redirect to SSL

Both Cloudflare and Servebolt have features in the Control Panel to force traffic to SSL.