{"id":12497,"date":"2025-03-05T23:46:12","date_gmt":"2025-03-05T23:46:12","guid":{"rendered":"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/"},"modified":"2025-03-05T23:46:12","modified_gmt":"2025-03-05T23:46:12","slug":"wordpress-redirects-made-easy-plugin-code-methods","status":"publish","type":"post","link":"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/","title":{"rendered":"WordPress Redirects Made Easy: Plugin &amp; Code Methods"},"content":{"rendered":"<p>WordPress redirects ensure your users (and Google) can find your content when you:<\/p>\n<ul>\n<li>Change the URL<\/li>\n<li>Combine two pieces of content<\/li>\n<li>Move your entire site to a new domain<\/li>\n<\/ul>\n<p>Using redirects avoids creating broken links (bad for user experience), or losing the authority of your backlinks (bad for your SEO).<\/p>\n<p>In this guide, I\u2019ll show you how to redirect your WordPress URLs with and without plugins.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#When_Should_You_Use_WordPress_Redirects\" >When Should You Use WordPress Redirects?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Types_of_WordPress_Redirects\" >Types of WordPress Redirects<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#301_Permanent_Redirect\" >301 Permanent Redirect<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#302_Temporary_Redirect\" >302 Temporary Redirect<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#What_to_Do_Before_You_Create_WordPress_Redirects\" >What to Do Before You Create WordPress Redirects<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Understand_What_Kind_of_WordPress_Site_You_Own\" >Understand What Kind of WordPress Site You Own<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Create_a_Backup\" >Create a Backup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Create_a_URL_Map\" >Create a URL Map<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Consider_Whether_You_Need_a_Redirect\" >Consider Whether You Need a Redirect<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#How_to_Redirect_WordPress_URLs_with_a_Plugin\" >How to Redirect WordPress URLs with a Plugin<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Redirection\" >Redirection<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#301_Redirects\" >301 Redirects<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Rank_Math\" >Rank Math<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Yoast\" >Yoast<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#AIO_SEO\" >AIO SEO<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#How_to_Set_Up_a_Redirect_in_WordPress_via_htaccess\" >How to Set Up a Redirect in WordPress via .htaccess<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#How_to_Access_htaccess\" >How to Access .htaccess<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Before_You_Start\" >Before You Start<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Redirecting_a_Single_Page\" >Redirecting a Single Page<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-20\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Redirecting_a_Single_Folder\" >Redirecting a Single Folder<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-21\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Redirecting_to_a_New_Domain\" >Redirecting to a New Domain<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-22\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Redirecting_HTTP_to_HTTPS\" >Redirecting HTTP to HTTPS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-23\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Redirecting_WWW_to_Non-WWW\" >Redirecting WWW to Non-WWW<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-24\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#Pros_and_Cons_of_Using_htaccess_for_WordPress_Redirects\" >Pros and Cons of Using .htaccess for WordPress Redirects<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-25\" href=\"https:\/\/craighordlow.com\/index.php\/2025\/03\/05\/wordpress-redirects-made-easy-plugin-code-methods\/#How_to_Check_Your_WordPress_Redirects_Are_Working\" >How to Check Your WordPress Redirects Are Working<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"When_Should_You_Use_WordPress_Redirects\"><\/span>When Should You Use WordPress Redirects?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You typically set up WordPress redirects any time you want visitors (and search engines) to end up at a different URL than the one they originally tried to access.<\/p>\n<p>That might be because you changed an old link, or because you\u2019re testing a new landing page.<\/p>\n<p>Here\u2019s a quick breakdown of the most common scenarios:<\/p>\n<div class=\"table-responsive\">\n<table class=\"table table-primary table-striped table-hover\">\n<thead>\n<tr>\n<th scope=\"col\">Use Case<\/th>\n<th scope=\"col\">Example<\/th>\n<th scope=\"col\">Why It Matters<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"strong\" scope=\"row\" data-before=\"Use Case\">Changing page URLs<\/td>\n<td data-before=\"Example\">You updated your post slug from \/old-page to \/new-page<\/td>\n<td data-before=\"Why It Matters\">A redirect ensures visitors who save, bookmark, or click the old link don\u2019t land on a 404 error<\/td>\n<\/tr>\n<tr>\n<td class=\"strong\" scope=\"row\" data-before=\"Use Case\">Deleting or merging content<\/td>\n<td data-before=\"Example\">You remove outdated pages or combine two posts into one<\/td>\n<td data-before=\"Why It Matters\">Redirects in these cases ensure you don\u2019t lose valuable backlinks<\/td>\n<\/tr>\n<tr>\n<td class=\"strong\" scope=\"row\" data-before=\"Use Case\">Rebranding or domain changes<\/td>\n<td data-before=\"Example\">You switch from olddomain.com to newdomain.com<\/td>\n<td data-before=\"Why It Matters\">A sitewide redirect preserves your site\u2019s SEO and minimizes traffic lost during the migration<\/td>\n<\/tr>\n<tr>\n<td class=\"strong\" scope=\"row\" data-before=\"Use Case\">Temporary promotions<\/td>\n<td data-before=\"Example\">You create a holiday sale page that\u2019s active for one week<\/td>\n<td data-before=\"Why It Matters\">A temporary (302) redirect lets you direct traffic to the special offer, then you can revert back to the original URL when it\u2019s over<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3><span class=\"ez-toc-section\" id=\"Types_of_WordPress_Redirects\"><\/span>Types of WordPress Redirects<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You\u2019ll mostly rely on two key types of redirects: <strong>301<\/strong> and <strong>302<\/strong>. (Even then, 301 is the type you\u2019ll likely use most often.)<\/p>\n<p>While there are others (like meta refresh), they don\u2019t come up nearly as often in day-to-day site management (and they\u2019re typically not best practice either). So I won\u2019t talk about them here.<\/p>\n<p>There are also subtle variations of these standard redirects (like 307 and 308 redirects). But these have very specific use cases that most site owners don\u2019t need to worry about.<\/p>\n<p>(If you do want to learn more about these, check out <a title=\"Redirects: What They Are &amp; How to Use Them\" href=\"https:\/\/www.semrush.com\/blog\/redirects\/\" target=\"_blank\" rel=\"noopener\">this extensive redirects guide<\/a>.)<\/p>\n<p>Here\u2019s a summary of what you actually need to know:<\/p>\n<h4><span class=\"ez-toc-section\" id=\"301_Permanent_Redirect\"><\/span>301 Permanent Redirect<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>This is the go-to redirect for any page move that\u2019s meant to last forever. You use it when you\u2019ve changed your URL structure, merged content, or changed your domain.<\/p>\n<figure class=\"backlinko-image__visual-chart backlinko-image\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"Merging two URLs\" alt=\"Merging two URLs\" data-aspect-ratio=\"0.62714285714286\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/07\/merging-two-urls.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>Search engines treat this as a permanent change and <strong>usually<\/strong> <a title=\"English Google Webmaster Central office-hours hangout\" href=\"https:\/\/www.youtube.com\/watch?v=mDzkW2eX82s&amp;t=1997s\" target=\"_blank\" rel=\"noopener\">transfer most of the old page\u2019s authority<\/a> to the new page.<\/p>\n<h4><span class=\"ez-toc-section\" id=\"302_Temporary_Redirect\"><\/span>302 Temporary Redirect<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>You use 302 redirects when you plan to send visitors to a new page for a limited time.<\/p>\n<p>This could be when you\u2019re running a seasonal promotion or an A\/B test to see which version of your page performs best.<\/p>\n<figure class=\"backlinko-image__visual-chart backlinko-image\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"301 vs 302 Redirects\" alt=\"301 vs 302 Redirects\" data-aspect-ratio=\"0.90428571428571\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/301-vs-302-redirects.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>A 302 redirect tells search engines that the old URL is coming back eventually, so they shouldn\u2019t transfer the SEO value to the new page just yet.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_to_Do_Before_You_Create_WordPress_Redirects\"><\/span>What to Do Before You Create WordPress Redirects<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Redirecting pages, no matter why or how you do it, always comes with an inherent risk.<\/p>\n<p>It\u2019s easy to make mistakes, like creating redirect chains:<\/p>\n<figure class=\"backlinko-image__visual-chart backlinko-image\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"Redirect chain\" alt=\"Redirect chain\" data-aspect-ratio=\"0.64857142857143\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/07\/redirect-chain.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>Or redirect loops:<\/p>\n<figure class=\"backlinko-image__visual-chart backlinko-image\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"Redirect loop\" alt=\"Redirect loop\" data-aspect-ratio=\"0.46857142857143\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/07\/redirect-loop.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>So it\u2019s best to do some planning before you get started.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Understand_What_Kind_of_WordPress_Site_You_Own\"><\/span>Understand What Kind of WordPress Site You Own<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>There are two flavors of WordPress:<\/p>\n<ul>\n<li><strong>WordPress.com<\/strong>: These sites are built on and hosted by WordPress<\/li>\n<li><strong>WordPress.org<\/strong>: These sites run the WordPress software, but you host them elsewhere<\/li>\n<\/ul>\n<p>Most sites you\u2019ll see talking about WordPress redirects, and everything I\u2019ll discuss below, only really applies to owners of sites running via WordPress.org.<\/p>\n<p>Sites running on WordPress.com typically have more limited customization options, and this applies to redirecting URLs.<\/p>\n<p>For example, <strong>users on WordPress\u2019s cheapest plan can\u2019t install plugins<\/strong>, so they won\u2019t be able to redirect URLs with this method.<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"WP \u2013 Pricing\" alt=\"WP \u2013 Pricing\" data-aspect-ratio=\"1.1257142857143\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/wp-pricing.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>This means you\u2019ll need to use WordPress\u2019s built-in redirect tool. You can learn more about the different use cases in <a title=\"Redirect a WordPress.com Site Address\" href=\"https:\/\/wordpress.com\/support\/site-redirect\/\" target=\"_blank\" rel=\"noopener\">this support article<\/a>.<\/p>\n<p>If you run a WordPress.org site (i.e., you pay for separate hosting), you can use either of the methods below.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Create_a_Backup\"><\/span>Create a Backup<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>It\u2019s always a good idea to back up your site before making any significant changes\u2014redirects included.<\/p>\n<p>Most good web hosts offer an option for this, but you\u2019ll also find external solutions and even WordPress plugins to do it for you.<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"Hostinger \u2013 Backup Options\" alt=\"Hostinger \u2013 Backup Options\" data-aspect-ratio=\"0.71\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/hostinger-backup-options.png\" loading=\"lazy\" \/><\/p><\/figure>\n<h3><span class=\"ez-toc-section\" id=\"Create_a_URL_Map\"><\/span>Create a URL Map<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Another good idea if you\u2019re redirecting a lot of URLs or moving to a new domain is to map all of your current URLs to their new versions.<\/p>\n<p>You can do this using tools like <a title=\"Screaming Frog SEO Spider Website Crawler\" href=\"https:\/\/www.screamingfrog.co.uk\/seo-spider\/\" target=\"_blank\" rel=\"noopener\">Screaming Frog<\/a> to get a comprehensive list of all your site\u2019s pages. Or, if your site isn\u2019t that big, just create a list manually (with the help of your sitemap).<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"ScreamingFrog\" alt=\"ScreamingFrog\" data-aspect-ratio=\"0.68428571428571\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/02\/screamingfrog.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>This gives you a reference for setting up all the redirects. And you can tick them all off as you put them in place and verify that they work.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Consider_Whether_You_Need_a_Redirect\"><\/span>Consider Whether You Need a Redirect<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Finally, consider whether you even need a redirect at all. I\u2019ve covered a few common situations above, but sometimes you might be better off:<\/p>\n<ul>\n<li>Updating the content and keeping the current URL<\/li>\n<li>Deleting the page<\/li>\n<li>Leaving it as is<\/li>\n<\/ul>\n<p>For example, you might have outdated content or a page that\u2019s no longer relevant, but no relevant page to redirect it to.<\/p>\n<p>But you don\u2019t want to lose the traffic or <a title=\"What Are Backlinks in SEO? &amp; Why You Need Them\" href=\"https:\/\/backlinko.com\/hub\/seo\/backlinks\" target=\"_blank\" rel=\"noopener\">backlinks<\/a> that post has attracted over time. In this case, it\u2019s often just best to leave it as is.<\/p>\n<p>Here\u2019s a flowchart to help you decide what to do:<\/p>\n<figure class=\"backlinko-image__visual-chart backlinko-image\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"When To Use Redirects\" alt=\"When To Use Redirects\" data-aspect-ratio=\"0.95285714285714\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/when-to-use-redirects.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>But if you do need a redirect, here\u2019s how to implement them.<\/p>\n<div class=\"sc-quote alert blue-box font-georgia type-normal transparent-img-bg\">\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-sm-down\">\n            <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/06\/icon-note.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">        <\/figure>\n<div class=\"media-body\">\n<blockquote class=\"sc-quote\">\n<p><strong>Note: <\/strong>It should go without saying that you\u2019ll need to own the domain you\u2019re redirecting. Otherwise anyone could redirect any domain to their own website.<\/p>\n<\/blockquote>\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-md-up\">\n                    <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/06\/icon-note.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">                <\/figure>\n<p>                                <cite class=\"sc-name media-body media-middle\"><br \/>\n                                    <\/cite>\n            <\/p><\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Redirect_WordPress_URLs_with_a_Plugin\"><\/span>How to Redirect WordPress URLs with a Plugin<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Using a plugin is by far the easiest way to handle redirects in WordPress. You don\u2019t have to touch any code, and they\u2019re usually pretty easy to set up.<\/p>\n<p>Here\u2019s an overview of the most popular WordPress plugins for creating redirects:<\/p>\n<div class=\"table-responsive\">\n<table class=\"table table-primary table-striped table-hover\">\n<thead>\n<tr>\n<th scope=\"col\">Plugin<\/th>\n<th scope=\"col\">Key Benefit<\/th>\n<th scope=\"col\">Price<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td class=\"strong\" scope=\"row\" data-before=\"Plugin\">Redirection<\/td>\n<td data-before=\"Key Benefit\">Handles 301 redirects with a simple interface<\/td>\n<td data-before=\"Price\">Free<\/td>\n<\/tr>\n<tr>\n<td class=\"strong\" scope=\"row\" data-before=\"Plugin\">301 Redirects<\/td>\n<td data-before=\"Key Benefit\">Quick setup for basic redirects<\/td>\n<td data-before=\"Price\">Free (with optional paid plans)<\/td>\n<\/tr>\n<tr>\n<td class=\"strong\" scope=\"row\" data-before=\"Plugin\">Rank Math<\/td>\n<td data-before=\"Key Benefit\">Offers advanced SEO tools plus auto-redirects when you change URL slugs<\/td>\n<td data-before=\"Price\">Free (Premium available)<\/td>\n<\/tr>\n<tr>\n<td class=\"strong\" scope=\"row\" data-before=\"Plugin\">Yoast<\/td>\n<td data-before=\"Key Benefit\">All-in-one SEO plugin<\/td>\n<td data-before=\"Price\">Paid (annual license)<\/td>\n<\/tr>\n<tr>\n<td class=\"strong\" scope=\"row\" data-before=\"Plugin\">AIO SEO<\/td>\n<td data-before=\"Key Benefit\">A range of SEO features and simple redirects<\/td>\n<td data-before=\"Price\">Paid (annual plans)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"sc-quote alert blue-box font-georgia type-normal transparent-img-bg\">\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-sm-down\">\n            <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/06\/icon-note.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">        <\/figure>\n<div class=\"media-body\">\n<blockquote class=\"sc-quote\">\n<p><strong>Note:<\/strong> I won\u2019t be going through all the steps for setting each of these up. In most cases, it\u2019s something like this:<\/p>\n<ul>\n<li>Install plugin<\/li>\n<li>Navigate to the redirects\/redirections menu within that plugin\u2019s settings<\/li>\n<li>Set up your redirects<\/li>\n<\/ul>\n<\/blockquote>\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-md-up\">\n                    <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/06\/icon-note.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">                <\/figure>\n<p>                                <cite class=\"sc-name media-body media-middle\"><br \/>\n                                    <\/cite>\n            <\/p><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>I\u2019ll show the main interface for each one below, but it\u2019s pretty self-explanatory. The main things to consider are any other plugin features you might need and whether you can do it for free.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Redirection\"><\/span>Redirection<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Types of redirects<\/strong>: 301\/302\/303\/304\/307\/308<\/p>\n<p><a title=\"Redirection \u2013 WordPress plugin | WordPress.org English (UK)\" href=\"https:\/\/en-gb.wordpress.org\/plugins\/redirection\/\" target=\"_blank\" rel=\"noopener\">Redirection<\/a> is the most popular free plugin for simple 301 redirects.<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"Redirection \u2013 Add Redirect\" alt=\"Redirection \u2013 Add Redirect\" data-aspect-ratio=\"0.28\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/redirection-add-redirect.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>It does exactly what the name implies and is a plugin purely for creating and managing redirects.<\/p>\n<p>You can add new redirects very easily, and the plugin automatically tracks any 404 errors on your site.<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"Redirection \u2013 Basic Setup\" alt=\"Redirection \u2013 Basic Setup\" data-aspect-ratio=\"0.87428571428571\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/redirection-basic-setup.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>Plus, if you update the URL of a page, you can set it to automatically create a redirect for it.<\/p>\n<p>That means you don\u2019t need to worry about <a title=\"How to Find (and Fix) Broken Links\" href=\"https:\/\/backlinko.com\/how-to-find-and-fix-broken-links\" target=\"_blank\" rel=\"noopener\">broken links<\/a> appearing that could cost you traffic and rankings.<\/p>\n<p>You can also choose various HTTP status codes for pages. This is handy if you\u2019re deleting content and want the URL to send a 410 gone status code, for example.<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"Redirection \u2013 Match Status\" alt=\"Redirection \u2013 Match Status\" data-aspect-ratio=\"0.41230769230769\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/redirection-match-status.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>The Redirection plugin can also handle a few useful sitewide redirects:<\/p>\n<ul>\n<li>HTTP to HTTPS<\/li>\n<li>Removing WWW<\/li>\n<li>Adding WWW<\/li>\n<\/ul>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"Redirection \u2013 Canonical Settings\" alt=\"Redirection \u2013 Canonical Settings\" data-aspect-ratio=\"0.42714285714286\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/redirection-canonical-settings.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>As I\u2019ll show you later, you can set these kinds of redirects up through .htaccess. But if you want a simple, no-code way to do it, this is SUPER useful.<\/p>\n<p>If you\u2019re looking for something lightweight and focused purely on redirects, this plugin is a great choice.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"301_Redirects\"><\/span>301 Redirects<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Types of redirects<\/strong>: 301\/302\/307<\/p>\n<p><a title=\"301 Redirects \u2013 Easy Redirect Manager \u2013 WordPress plugin | WordPress.org English (UK)\" href=\"https:\/\/en-gb.wordpress.org\/plugins\/eps-301-redirects\/\" target=\"_blank\" rel=\"noopener\">301 Redirects<\/a> is another option if you just want basic link redirection without any extra features.<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"301 Redirects \u2013 Redirect Rules\" alt=\"301 Redirects \u2013 Redirect Rules\" data-aspect-ratio=\"0.29285714285714\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/301-redirects-redirect-rules.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>The free version handles most common redirect scenarios through a simple interface.<\/p>\n<p>But there\u2019s a premium version available if you want other features like:<\/p>\n<ul>\n<li>Redirect management and matching rules<\/li>\n<li>Detailed 404 monitoring<\/li>\n<li>Link scanning<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Rank_Math\"><\/span>Rank Math<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Types of redirects<\/strong>: 301\/302\/307<\/p>\n<p><a title=\"Rank Math SEO \u2013 AI SEO Tools to Dominate SEO Rankings \u2013 WordPress plugin\" href=\"https:\/\/wordpress.org\/plugins\/seo-by-rank-math\/\" target=\"_blank\" rel=\"noopener\">Rank Math<\/a> is an all-in-one SEO plugin that also lets you create redirects\u2014without needing a premium subscription.<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"RankMath \u2013 Add Redirection\" alt=\"RankMath \u2013 Add Redirection\" data-aspect-ratio=\"1.3953846153846\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/rankmath-add-redirection.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>Note that you can set up three types of redirects and choose 410 or 451 status codes.<\/p>\n<p>Its standout feature (for this discussion) is the auto-redirect function: when you change a <a title=\"What Is a URL Slug? (Why It Matters for SEO + Best Practices)\" href=\"https:\/\/backlinko.com\/hub\/seo\/url-slug\" target=\"_blank\" rel=\"noopener\">URL slug<\/a>, the plugin sets up a redirect for you automatically.<\/p>\n<p>This saves you from having to remember to do it yourself.<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"RankMath \u2013 Auto Post Redirect\" alt=\"RankMath \u2013 Auto Post Redirect\" data-aspect-ratio=\"0.22571428571429\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/rankmath-autopost-redirect.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>It also includes an array of other SEO tools\u2014like keyword optimization and schema settings.<\/p>\n<p>So, if you need a plugin that can handle other aspects of your site\u2019s SEO, Rank Math is a good pick.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Yoast\"><\/span>Yoast<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Types of redirects<\/strong>: 301\/302\/307\/410\/451<\/p>\n<p><a title=\"Yoast SEO \u2013 WordPress plugin\" href=\"https:\/\/en-gb.wordpress.org\/plugins\/wordpress-seo\/\" target=\"_blank\" rel=\"noopener\">Yoast<\/a> is one of the most popular SEO plugins for WordPress.<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"Yoast \u2013 Redirect\" alt=\"Yoast \u2013 Redirect\" data-aspect-ratio=\"0.47\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/yoast-redirect.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>The downside is that you need the premium version to access the built-in redirect manager. If you\u2019re already using Yoast Premium for other features though, it\u2019s a no-brainer.<\/p>\n<p>You\u2019ll get a user-friendly interface for setting up 301 or 302 redirects (and 410\/451 status codes), and it\u2019ll automatically set up redirects when you change URLs.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"AIO_SEO\"><\/span>AIO SEO<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Types of redirects<\/strong>: 301\/302\/303\/304\/307\/308<\/p>\n<p><a title=\"All in One SEO \u2013 Powerful SEO Plugin to Boost SEO Rankings &amp; Increase Traffic\" href=\"https:\/\/en-gb.wordpress.org\/plugins\/all-in-one-seo-pack\/\" target=\"_blank\" rel=\"noopener\">AIO SEO<\/a> (All in One SEO) is another heavyweight in the SEO world. It offers redirect features, but you need a paid subscription to unlock them.<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"AIOSEO \u2013 Redirects\" alt=\"AIOSEO \u2013 Redirects\" data-aspect-ratio=\"0.71142857142857\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/aioseo-redirects.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>In return, you get a clean, well-structured dashboard where you can manage redirects alongside other SEO tasks.<\/p>\n<p>Like the others, the redirect manager is straightforward\u2014just enter the old URL, the new URL, and save.<\/p>\n<p>If you\u2019re already using AIO SEO for keyword optimization or sitemap management, upgrading for the redirect module could make sense.<\/p>\n<div class=\"sc-quote alert blue-box font-georgia type-normal transparent-img-bg\">\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-sm-down\">\n            <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/06\/icon-note.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">        <\/figure>\n<div class=\"media-body\">\n<blockquote class=\"sc-quote\">\n<p><strong>Note<\/strong>: You probably won\u2019t want to use any combination of Rank Math, Yoast, and AIO SEO. They all do many of the same things, and conflicts between them can cause issues with your site.<\/p>\n<\/blockquote>\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-md-up\">\n                    <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/06\/icon-note.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">                <\/figure>\n<p>                                <cite class=\"sc-name media-body media-middle\"><br \/>\n                                    <\/cite>\n            <\/p><\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Set_Up_a_Redirect_in_WordPress_via_htaccess\"><\/span>How to Set Up a Redirect in WordPress via .htaccess<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you\u2019re comfortable taking a more hands-on approach, you can skip plugins entirely and create redirects by editing your site\u2019s .htaccess file.<\/p>\n<p>(Note that this only applies to WordPress sites running on Apache, not Nginx.)<\/p>\n<p>This file tells your server how to handle certain requests, and it\u2019s often used for things like permalinks and redirect rules.<\/p>\n<p>It can be faster than installing a plugin, and if you already have lots of plugins on your site, it limits how much extra \u201cbloat\u201d you add to it.<\/p>\n<p>In other words: your site might run faster.<\/p>\n<p>The catch is that <strong>one wrong line of code can bring your whole site down<\/strong>. So I strongly recommend you consult your developer if possible. Or, at the very least, take a lot of care when doing it yourself.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"How_to_Access_htaccess\"><\/span>How to Access .htaccess<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The usual method to edit your .htaccess file involves an FTP client. This is a \u201cfile transfer protocol\u201d program that lets you access your server\u2019s files from your computer.<\/p>\n<p>There are lots of options, like <a title=\"Cyberduck\" href=\"https:\/\/cyberduck.io\/\" target=\"_blank\" rel=\"noopener\">Cyberduck<\/a>, <a title=\"FileZilla\" href=\"https:\/\/filezilla-project.org\/\" target=\"_blank\" rel=\"noopener\">FileZilla<\/a>, and <a title=\"WinSCP :: Official Site :: Download\" href=\"https:\/\/winscp.net\/eng\/download.php\" target=\"_blank\" rel=\"noopener\">WinSCP<\/a>.<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"Cyberduck \u2013 FTP\" alt=\"Cyberduck \u2013 FTP\" data-aspect-ratio=\"0.58307692307692\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/cyberduck-ftp.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>Check out <a title=\"Complete .htaccess File Tutorial: What It Is &amp; How to Use It\" href=\"https:\/\/www.semrush.com\/blog\/htaccess-file\/#:~:text=the%20save%20button.-,2.%20FTP%20Client,-A%20file%20transfer\" target=\"_blank\" rel=\"noopener\">this guide to .htaccess files<\/a> for a walkthrough of how to do this.<\/p>\n<p>In many cases, you can edit your .htaccess file right inside your hosting control panel (like cPanel or a similar dashboard).<\/p>\n<p>Look for a \u201c<strong>File Manager<\/strong>\u201d or something similar:<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"File Manager\" alt=\"File Manager\" data-aspect-ratio=\"0.47\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/file-manager.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>Then, look in your site\u2019s root folder (often called public_html) for your .htaccess file.<\/p>\n<p>It might be hidden by default\u2014there\u2019s usually an option in your settings to change that.<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"File Manager \u2013 htaccess\" alt=\"File Manager \u2013 htaccess\" data-aspect-ratio=\"0.62\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/file-manager-htaccess.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>You\u2019ll see lines of code that might look a bit intimidating, but don\u2019t panic.<\/p>\n<p>You don\u2019t need to edit any of them. We\u2019ll just be adding some additional lines of code to our .htaccess file.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Before_You_Start\"><\/span>Before You Start<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>For some redirects, you\u2019ll need to add a few lines of code like this:<\/p>\n<pre>Options +FollowSymLinks\r\nRewriteEngine On<\/pre>\n<p>You don\u2019t need to worry too much about what this does, but essentially it lets you add certain rules that\u2019ll execute specific types of redirects. (Some hosts might enable the first line by default, but it\u2019s fine to add it here anyway.)<\/p>\n<p>You don\u2019t need these for a basic single redirect, but you will for the more complex ones.<\/p>\n<p><strong>You also only need to add it once in your .htaccess file<\/strong> (provided you don\u2019t also have \u201cRewriteEngine Off\u201d somewhere else in the file). But I\u2019ve included it in each of the instances below that require it.<\/p>\n<p>Finally, it\u2019s important to note that <strong>these .htaccess rules don\u2019t \u201ccreate\u201d any new pages<\/strong>.<\/p>\n<p>You need to ensure the pages you\u2019re redirecting to are live when you add the rule. Otherwise the redirect will lead to an error page.<\/p>\n<p>With that in mind, here are the most common types of WordPress redirects you can add to your .htaccess file. In each case, add them at the start of your .htaccess file.<\/p>\n<div class=\"sc-quote alert blue-box font-georgia type-normal transparent-img-bg\">\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-sm-down\">\n            <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/06\/icon-further-reading.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">        <\/figure>\n<div class=\"media-body\">\n<blockquote class=\"sc-quote\">\n<p><strong>Free resource<\/strong>: To make things even easier, download our <a title=\"WordPress Redirects Cheat Sheet\" href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1lFlNmLiygzbWH4eSMDc0g4AKTJEB8KXStcVqpNysGnY\/copy\" target=\"_blank\" rel=\"noopener\">free .htaccess WordPress redirects cheat sheet<\/a>.<\/p>\n<\/blockquote>\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-md-up\">\n                    <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/06\/icon-further-reading.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">                <\/figure>\n<p>                                <cite class=\"sc-name media-body media-middle\"><br \/>\n                                    <\/cite>\n            <\/p><\/div>\n<\/div>\n<\/div>\n<\/div>\n<h3><span class=\"ez-toc-section\" id=\"Redirecting_a_Single_Page\"><\/span>Redirecting a Single Page<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To redirect a single page using your .htaccess file, add this line of code, replacing the \/old-url and \/new-url parts with your own URLs:<\/p>\n<pre class=\"mb-2\">Redirect 301 \/old-url https:\/\/yourdomain.com\/new-url<\/pre>\n<div class=\"sc-quote alert blue-box font-georgia type-normal transparent-img-bg\">\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-sm-down\">\n            <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/06\/icon-note.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">        <\/figure>\n<div class=\"media-body\">\n<blockquote class=\"sc-quote\">\n<p><strong>Note<\/strong>: The first part (\/old-url) should be the relative form of the URL. But the second part should be the full URL, including the protocol (https:\/\/) and domain name.<\/p>\n<\/blockquote>\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-md-up\">\n                    <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2024\/06\/icon-note.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">                <\/figure>\n<p>                                <cite class=\"sc-name media-body media-middle\"><br \/>\n                                    <\/cite>\n            <\/p><\/div>\n<\/div>\n<\/div>\n<\/div>\n<h3><span class=\"ez-toc-section\" id=\"Redirecting_a_Single_Folder\"><\/span>Redirecting a Single Folder<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>When you want to redirect a folder (e.g., moving a \/blog category over to your \/news category), use this code:<\/p>\n<pre>Options +FollowSymLinks\r\nRewriteEngine On\r\nRewriteRule ^blog\/(.*)$ \/news\/$1 [L,R=301]<\/pre>\n<p>Again, you\u2019d replace the blog and news parts with your own folder names.<\/p>\n<p>But what do all the other parts mean?<\/p>\n<p>You don\u2019t need to know the specifics, as there are lots of possible combinations. But this particular case does the following:<\/p>\n<ul>\n<li><strong>^<\/strong> means \u201cstart looking at the beginning of the URL path\u201d<\/li>\n<li><strong>blog\/<\/strong> is the folder we\u2019re redirecting from<\/li>\n<li><strong>(.*)<\/strong> captures everything after blog\/ (think of it like copying it to the clipboard)<\/li>\n<li><strong>$<\/strong> basically says \u201cthat\u2019s the end of what we\u2019re looking for\u201d<\/li>\n<li><strong>\/news\/<\/strong> is the new folder we\u2019re redirecting to<\/li>\n<li><strong>$1<\/strong> essentially \u201cpastes\u201d everything we \u201ccopied\u201d with (.*) into the new location<\/li>\n<li><strong>L<\/strong> means stop processing rules for this specific request once it matches this rule<\/li>\n<li><strong>R=301<\/strong> means it\u2019s a 301 redirect (as opposed to 302, for example)<\/li>\n<\/ul>\n<p>So, it would redirect a URL like:<\/p>\n<p><strong>https:\/\/yourdomain.com\/blog\/post-1<br \/>\n<\/strong><\/p>\n<p>To:<\/p>\n<p><strong>https:\/\/yourdomain.com\/news\/post-1<\/strong><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Redirecting_to_a_New_Domain\"><\/span>Redirecting to a New Domain<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Redirecting to a new domain is where things can get tricky. Having done this myself, <strong>I strongly recommend you speak to your developer first<\/strong>.<\/p>\n<p>But if you plan to do it yourself, here\u2019s one example of a rule you can add to your .htaccess file (obviously subbing in your specific old and new domains, with or without www as required):<\/p>\n<pre>Options +FollowSymLinks\r\nRewriteEngine On\r\nRewriteCond %{HTTP_HOST} ^(www.)?olddomain.com [NC]\r\nRewriteRule ^(.*)$ https:\/\/newdomain.com\/$1 [L,R=301]<\/pre>\n<p>As with redirecting folders, there are a lot of symbols in there. I won\u2019t go over them all individually, but here are a few important parts:<\/p>\n<ul>\n<li>RewriteCond %{HTTP_HOST} essentially means \u201ccheck what domain the user is trying to access\u201d<\/li>\n<li>^(www.)? matches either www. or nothing at the start of the domain\u2014this ensures it catches both www.olddomain.com and olddomain.com<\/li>\n<li>[NC] means \u201cnot case sensitive,\u201d so OLDDOMAIN.com would also match<\/li>\n<li>^(.*)$ captures the entire URL path after the domain (like \/about or \/contact)<\/li>\n<\/ul>\n<p>So this code would redirect:<\/p>\n<ul>\n<li>https:\/\/olddomain.com\/about &gt; https:\/\/newdomain.com\/about<\/li>\n<li>https:\/\/www.olddomain.com\/blog &gt; https:\/\/newdomain.com\/blog<\/li>\n<li>https:\/\/olddomain.com\/product\/item &gt; https:\/\/newdomain.com\/product\/item<\/li>\n<\/ul>\n<p><strong>This maintains the same structure for each URL but on the new domain.<\/strong><\/p>\n<p>You can tweak some of the symbols to catch or ignore specific parts of the URL. But again, it\u2019s probably best to seek help from your developer if you need a more precise solution.<\/p>\n<div class=\"sc-quote alert blue-box font-georgia type-normal transparent-img-bg\">\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-sm-down\">\n            <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/icon-remember-v2.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">        <\/figure>\n<div class=\"media-body\">\n<blockquote class=\"sc-quote\">\n<p><strong>Remember<\/strong>: This .htaccess rule doesn\u2019t create any pages on the new site.<\/p>\n<\/blockquote>\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-md-up\">\n                    <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/icon-remember-v2.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">                <\/figure>\n<p>                                <cite class=\"sc-name media-body media-middle\"><br \/>\n                                    <\/cite>\n            <\/p><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>If you try to redirect \u201colddomain.com\/example-page\u201d but there\u2019s no \u201cnewdomain.com\/example-page\u201d or its URL is slightly different (e.g., newdomain.com\/example-page1), the user will get a 404 error.<\/p>\n<p>That\u2019s why you should create a redirect map before starting a site move. For more on this, see our <a title=\"Website Migration Checklist: Essential SEO Steps for Success\" href=\"https:\/\/backlinko.com\/website-migration-checklist\" target=\"_blank\" rel=\"noopener\">website migration checklist<\/a>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Redirecting_HTTP_to_HTTPS\"><\/span>Redirecting HTTP to HTTPS<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>You can also redirect your website from HTTP (unsecure) to <a title=\"What Is HTTPS &amp; How Does It Work? [Explained]\" href=\"https:\/\/www.semrush.com\/blog\/what-is-https\/\" target=\"_blank\" rel=\"noopener\">HTTPS (secure)<\/a> via .htaccess. (You\u2019ll, of course, need a valid SSL certificate.)<\/p>\n<p>However:<\/p>\n<p><strong>You might not need to<\/strong>. There\u2019s a good chance your web host offers a method to do this for you. Or you might already have a plugin that does it.<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"Domains \u2013 Force HTTPS\" alt=\"Domains \u2013 Force HTTPS\" data-aspect-ratio=\"0.53285714285714\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/domains-force-https.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>In either case, you shouldn\u2019t then add a separate .htaccess rule to redirect to HTTPS. <strong>Doing so can actually lead to issues<\/strong>.<\/p>\n<p>But if you do want to add it, here\u2019s the code:<\/p>\n<pre>Options +FollowSymLinks\r\nRewriteEngine On\r\nRewriteCond %{HTTPS} off\r\nRewriteRule ^ https:\/\/%{HTTP_HOST}%{REQUEST_URI} [L,R=301]<\/pre>\n<p>You can copy and paste this rule directly into your .htaccess file without subbing anything in.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Redirecting_WWW_to_Non-WWW\"><\/span>Redirecting WWW to Non-WWW<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>As with redirecting to HTTPS, you can usually redirect from the www. version of your website without touching your .htaccess file.<\/p>\n<p>One method is through your WordPress dashboard\u2019s \u201c<strong>General<\/strong>\u201d settings tab. Just enter the URL you want to use for your domain name in the \u201cWordPress Address\u201d and \u201cSite Address Boxes\u201d:<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"WP \u2013 Redirect\" alt=\"WP \u2013 Redirect\" data-aspect-ratio=\"0.36571428571429\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/wp-redirect.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>But if you want to do this via .htaccess, here\u2019s the code to add (you can copy and paste it in without changing anything):<\/p>\n<pre class=\"mb-2\">Options +FollowSymLinks\r\nRewriteEngine On\r\nRewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]\r\nRewriteRule ^(.*)$ https:\/\/%1\/$1 [L,R=301]\r\n<\/pre>\n<div class=\"sc-quote alert blue-box font-georgia type-normal transparent-img-bg\">\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-sm-down\">\n            <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/icon-remember-v2.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">        <\/figure>\n<div class=\"media-body\">\n<blockquote class=\"sc-quote\">\n<p><strong>Remember<\/strong>: You only need to add one instance of \u201cRewriteEngine On\u201d in your .htaccess file.<\/p>\n<\/blockquote>\n<div class=\"media\">\n<figure class=\"sc-picture media-left hidden-md-up\">\n                    <img decoding=\"async\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/icon-remember-v2.png\" alt=\"| Craig Hordlow\" loading=\"lazy\" title=\"| Craig Hordlow\">                <\/figure>\n<p>                                <cite class=\"sc-name media-body media-middle\"><br \/>\n                                    <\/cite>\n            <\/p><\/div>\n<\/div>\n<\/div>\n<\/div>\n<h3><span class=\"ez-toc-section\" id=\"Pros_and_Cons_of_Using_htaccess_for_WordPress_Redirects\"><\/span>Pros and Cons of Using .htaccess for WordPress Redirects<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The main advantages of using .htaccess to redirect WordPress URLs include:<\/p>\n<ul>\n<li><strong>Fewer plugins, less bloat<\/strong>: Every plugin you install can slow down your site. Changes to .htaccess don\u2019t rely on lots of extra code running in the background.<\/li>\n<li><strong>Extra control<\/strong>: You can set up advanced redirect rules, and you can be very specific about what does and doesn\u2019t redirect.<\/li>\n<li><strong>Fast execution<\/strong>: Because .htaccess rules run at the server level, your redirects happen quickly.<\/li>\n<\/ul>\n<p>But there are a few drawbacks:<\/p>\n<ul>\n<li><strong>Risk of breaking your site<\/strong>: One small typo can cause major errors. Double-check everything, and always keep a backup.<\/li>\n<li><strong>No built-in tracking<\/strong>: Unlike plugin dashboards that log errors and hits, you won\u2019t see which URLs have triggered the redirect unless you check your server logs.<\/li>\n<li><strong>Potential performance impact<\/strong>: While the actual redirects might be fast, adding lots of .htaccess rules could impact overall performance and <a title=\"Page Speed and SEO: The Complete Guide\" href=\"https:\/\/backlinko.com\/hub\/seo\/pagespeed\" target=\"_blank\" rel=\"noopener\">page speed<\/a> (although it won\u2019t be noticeable in most cases).<\/li>\n<\/ul>\n<p>A big caveat here, though, is that which method is right for you will depend on how many redirects you need to implement and the nature of them.<\/p>\n<p><strong>Need to redirect a couple of pages, and want an easy way to do it as needed?<\/strong><\/p>\n<p>The likely small performance impact of a single plugin is probably worth it for the flexibility and convenience.<\/p>\n<p><strong>Redirecting one URL?<\/strong><\/p>\n<p>It\u2019s probably most efficient to add it to your .htaccess file (it\u2019s just one line of code).<\/p>\n<p><strong>Performing a massive site migration with thousands or millions of redirects? <\/strong><\/p>\n<p>For massive sites, it\u2019s probably not worth taking any risks trying to use a plugin or editing your .htaccess file. This is where you\u2019ll likely want to seek expert assistance.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Check_Your_WordPress_Redirects_Are_Working\"><\/span>How to Check Your WordPress Redirects Are Working<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Whether you set your redirects up using a plugin or via .htaccess, I recommend testing to make sure they work <strong>as soon as you\u2019ve implemented them<\/strong>. This lets you fix errors before they impact your users (or your SEO).<\/p>\n<p>You can do this manually by checking the URLs if you didn\u2019t create that many redirects.<\/p>\n<p>But if you have lots of them, you can use a tool like Semrush\u2019s <a title=\"Site Audit: Improve the SEO of Your Website | Semrush\" href=\"https:\/\/www.semrush.com\/siteaudit\/\" target=\"_blank\" rel=\"noopener\">Site Audit<\/a> to check for issues across your entire site.<\/p>\n<p>You just set up your audit and once it runs, you\u2019ll head to the \u201c<strong>Issues<\/strong>\u201d tab.<\/p>\n<p>Search for \u201clinks\u201d to bring up any relevant issues:<\/p>\n<figure class=\"backlinko-image__screenshot backlinko-image backlinko-has-border\">\n<div class=\"backlinko-img-placeholder\"><\/div>\n<p><img decoding=\"async\" title=\"Site Audit \u2013 Issues \u2013 Links\" alt=\"Site Audit \u2013 Issues \u2013 Links\" data-aspect-ratio=\"0.84571428571429\" src=\"https:\/\/backlinko.com\/app\/uploads\/2025\/03\/site-audit-issues-links.png\" loading=\"lazy\" \/><\/p><\/figure>\n<p>Pay particular attention to these errors and warnings:<\/p>\n<ul>\n<li># internal links are broken<\/li>\n<li># pages returned 4XX status code<\/li>\n<li># redirect chains and loops<\/li>\n<li># pages with a broken canonical link<\/li>\n<li># links couldn\u2019t be crawled (incorrect URL formats)<\/li>\n<li># links on HTTPS pages lead to HTTP page<\/li>\n<\/ul>\n<p>These often occur when you implement lots of redirects and set up some (or all) of them incorrectly.<\/p>\n<div class=\"sc-quote alert blue-box font-georgia type-normal transparent-img-bg\">\n<div class=\"media\">\n<div class=\"media-body\">\n<blockquote class=\"sc-quote\">\n<p>You can audit your site for free for up to 100 URLs. But for crawling more than that, <a title=\"https:\/\/www.semrush.com\/lp\/backlinko-offer\/en\/\" href=\"https:\/\/www.semrush.com\/lp\/backlinko-offer\/en\/\" target=\"_blank\" rel=\"noopener\">try a Pro plan for free for 14 days with this link<\/a>. <\/p>\n<\/blockquote>\n<div class=\"media\">\n                                <cite class=\"sc-name media-body media-middle\"><br \/>\n                                    <\/cite>\n            <\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>The post <a href=\"https:\/\/backlinko.com\/wordpress-redirects\" target=\"_blank\" rel=\"noopener\">WordPress Redirects Made Easy: Plugin &amp; Code Methods<\/a> appeared first on <a href=\"https:\/\/backlinko.com\/\" target=\"_blank\" rel=\"noopener\">Backlinko<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>WordPress redirects ensure your users (and Google) can find your content when you: Change the URL Combine two pieces of content Move your entire site to a new domain Using redirects avoids creating broken links (bad for user experience), or losing the authority of your backlinks (bad for your SEO). In this guide, I\u2019ll show you how to redirect your WordPress URLs with and without plugins. When Should You Use WordPress Redirects? You typically set up WordPress redirects any time you want visitors (and search engines) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":12498,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"h5ap_radio_sources":[],"cybocfi_hide_featured_image":"","footnotes":""},"categories":[8],"tags":[],"class_list":["post-12497","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backlinko"],"featured_image_src":"https:\/\/craighordlow.com\/wp-content\/uploads\/2025\/03\/merging-two-urls-ZPMsXa-600x400.png","featured_image_src_square":"https:\/\/craighordlow.com\/wp-content\/uploads\/2025\/03\/merging-two-urls-ZPMsXa-600x600.png","author_info":{"display_name":false,"author_link":"https:\/\/craighordlow.com\/author\/craig\/"},"_links":{"self":[{"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/posts\/12497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/comments?post=12497"}],"version-history":[{"count":0,"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/posts\/12497\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/media\/12498"}],"wp:attachment":[{"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/media?parent=12497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/categories?post=12497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/craighordlow.com\/index.php\/wp-json\/wp\/v2\/tags?post=12497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}