This article will cover setting up redirects in WordPress and the related tasks. Managing redirection optimally is important for overall website design.
Setting up redirects in WordPress: how to find redirects in WordPress
Common redirects that would be needed can be found by looking in the Google Search Console tools, which will show the site URLs returning 404 results. For example, if you changed the post category structure on your site or the blog archive page slug, you would want to cover those in redirects.
The idea of setting up redirects would be to ensure that site users are landing on the expected correct pages, and if pages and posts have changed permalinks and slug names, then you would want to handle those.
Setting up redirects in WordPress: HTTP URLs redirection to HTTPS URLs
Also, if your site used to be HTTP and then moved to HTTPS, then you would want to have .htaccess redirection in place so that any HTTP URL request would be automatically redirected to the HTTPS version of the site. Forcing the site to be HTTPS is easy to achieve in your site's .htaccess file. Nexcess still allows the use of a .htaccess file since NGNIX is used as a reverse proxy in front of the application stack, which uses Apache and MariaDB.
Setting up redirects in WordPress: major permalink or URL changes
Any major permalink changes or URL changes made on your site should be covered with the correct redirects. Since the last place you want to land site users on is a 404 not found result from a URL, they were used to going to all for a search result that was indexed in Google or Bing has changed. Still, if there is no redirect in the place to handle the correct landing page or URL, the customer should be visiting too.
The Nexcess Knowledge Base includes many other helpful articles to help you with common issues for your WordPress site.
Setting up redirects in WordPress: how to check site redirects in WordPress
To check that site redirections on your WordPress site are working, you will first have to set up those redirections. Best practices for setting up WordPress redirects will help you with what you should set up as redirections on your site.
Recommended plugins for easy redirections are Redirection and Safe Redirect Manager. Both plugins are easy to use and are two of the most popular plugins for that functionality.
Setting up redirects in WordPress: Redirection plugin
The Redirection plugin is a valuable asset for setting up redirects in WordPress that WordPress admins should leverage:
The Redirection plugin will add a new settings menu in wp-admin under the following navigational path:
Tools > Redirection
Setting up redirects in WordPress: Safe Redirect Manager plugin
Likewise, the Safe Redirect Manager plugin is useful for setting up redirects in WordPress that WordPress admins take advantage of:
The Safe Redirect Manager plugin adds a settings menu in wp-admin under the following navigational path:
Tools > Safe Redirect Manager
Setting up redirects in WordPress: about types of redirects 301 versus 302
There are two main types of redirects 301 for when the redirect is permanent or 302 for when the redirect is temporary.
Setting up redirects in WordPress: advanced features available via the Redirection plugin
The Redirection plugin also includes many other tools, such as redirection logging, 404 logging, and URL monitoring:
Redirection plugin: beta feature for redirect caching
If you use object caching on a site such as Redis, then the Redirection plugin now has a beta feature for redirect caching:
Redirection plugin: importing and exporting redirects
The Redirection plugin also supports the importing and exporting of redirects in CVS, JSON, and htaccess file formats. Logs being generated in the Redirection plugin can also be exported from wp-admin:
Suppose you already have existing redirects set up from any of the following plugins — in that case, would use the import feature:
- Safe Redirect Manager
- SEO Redirection
- Simple 301 Redirects
- WordPress Old Post Slugs
- Quick Post/Page Redirects
The Redirection plugin also supports importing from those plugin sources. If you have existing redirects set up on the site using other redirection plugins, then the data for those would still exist and be needed to be manually deleted from the site's database. In addition, some plugins might remove redirect data when the plugin is uninstalled on a site.
The Redirection plugin includes WordPress Command Line Interface (WP-CLI) support, so you can make changes from WP-CLI command without using wp-admin. The Safe Redirect Manager plugin also does have WP-CLI support.
Setting up redirects in WordPress: helpful resources
Here are some helpful resources to help in setting up redirects in WordPress:
- https://wordpress.org/plugins/redirection/
- https://redirection.me/
- https://redirection.me/support/
- https://redirection.me/support/what-is-a-redirect/
- https://redirection.me/support/logs/
- https://redirection.me/support/tracking-404-errors/
- https://redirection.me/support/options/#monitor
- https://redirection.me/blog/how-long-to-keep-a-redirect/
- https://wordpress.org/plugins/safe-redirect-manager
- https://github.com/10up/safe-redirect-manager
- https://www.nexcess.net/help/example-code-for-common-htaccess-rewrite-commands/
- https://www.semrush.com/blog/redirects/
About the Nexcess advanced web hosting features included with WordPress and WooCommerce plans
At Nexcess, Managed WordPress hosting comes with many industry-standard hosting features, such as one-click staging site creation. All Managed WordPress and Managed WooCommerce plan sites come with the Object Cache Pro plugin, which is the best solution for Redis integration for a persistent object cache on your site.
Nexcess also comes with an in-house integrated CDN which can be used for improving site performance by serving site assets (image files, JavaScript, and CSS) from the CDN to visitors of your site.
In addition, Nexcess provides unique features such as the Plugin Performance Monitor and WooCommerce Automated Testing.
Managed WordPress hosting, elevated
Maximum speed with free Object Cache Pro, premium image compression, and a built-in CDN.
All Managed WordPress and Managed WooCommerce come with image optimization provided by the TinyPNG service and plugin at no additional cost. TinyPNG supports JPEG, PNG, and WebP image formats and will handle both new media uploaded to the site and bulk optimize existing images in the site's media library.
Also, all Managed WordPress and Managed WooCommerce plans come with high levels of PHP workers and auto-scaling for when you need extra PHP workers for your site's performance on a temporary basis. If you want to improve the search on your WordPress site or WooCommerce store, then the ElasticPress plugin can be used with a low monthly cost Elasticsearch container for a fast search experience.
Nexcess also makes it easy to purge all types of caching, such as CDN, Redis object caching, and NGNIX microcaching — all directly from the admin bar in wp-admin on your site.
Recent articles
- FAQ for cloud web hosting plans at Nexcess
- Magento security patch: installing Magento 2.4.5-p1
- OpenSSL CSR generation with private key