{"id":4281,"date":"2022-03-14T05:31:00","date_gmt":"2022-03-14T10:31:00","guid":{"rendered":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/"},"modified":"2022-03-14T05:31:00","modified_gmt":"2022-03-14T10:31:00","slug":"wordpress-redirects","status":"publish","type":"post","link":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/","title":{"rendered":"WordPress Redirects: a Complete Guide"},"content":{"rendered":"<p>If you\u2019ve redesigned your WordPress website or made revisions to its permalink structure, chances are that many of your URLs have changed. This is an issue for search engines and users alike.&nbsp;<\/p>\n\n\n\n<p>Fortunately, WordPress redirects offer a simple solution. When you use a redirect, your visitors won\u2019t be negatively impacted, and you\u2019ll be able to keep your search engine rankings intact.<\/p>\n\n\n\n<p>On this page, we\u2019ll talk about what WordPress redirects are and how to implement them. Let\u2019s dive in!<\/p>\n\n\n\n\n\n<h2 id=\"toc-what-is-a-page-redirect\" class=\"wp-block-heading\">What is a page redirect?<\/h2>\n\n\n\n<p>A <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"internal\" href=\"https:\/\/wpengine.com\/support\/redirect\/\">page redirect<\/a> is a set of rules telling a browser to forward visitors from the link they clicked on to a different page. There are two outcomes for your end users when you redirect a page. They will either see a message that lets them know they are being redirected or simply be forwarded without being notified.<\/p>\n\n\n\n<p>If you\u2019ve changed your domain, made updates to your permalinks, or redesigned your site, you\u2019ll need to add redirects so your pre-existing content is still accessible to readers and search engines. Think of it this way: When you move to a new home, you must contact the post office and have your mail forwarded to your new address. Redirects work the same way, except instead of forwarding your mail, you forward users to a new web page.<\/p>\n\n\n\n<h2 id=\"toc-when-why-should-you-redirect-a-page\" class=\"wp-block-heading\">When &amp; why should you redirect a page?<\/h2>\n\n\n\n<p>There are various reasons you may want to redirect URLs on your site. Some of the most common include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A specific page is no longer relevant.<\/li>\n\n\n\n<li>The page\u2019s URL is changing.<\/li>\n\n\n\n<li>You\u2019re moving or deleting content.<\/li>\n\n\n\n<li>You\u2019re moving your domain from <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"internal\" href=\"https:\/\/wpengine.com\/resources\/what-are-ssl-certificates\/\" target=\"_blank\" rel=\"noreferrer noopener\">HTTP to HTTPS<\/a>.<\/li>\n\n\n\n<li>You\u2019re working on using a different domain or changing your original domain name<\/li>\n\n\n\n<li>You want to redirect an old URL to reclaim a broken link<\/li>\n<\/ul>\n\n\n\n<p>In addition, redirects can help you ensure that if a page is broken or missing, users will be sent along to your site\u2019s other content without interruption.<\/p>\n\n\n\n<h3 id=\"toc-why-should-you-implement-a-redirect\" class=\"wp-block-heading\">Why should you implement a redirect?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Similar to <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/sunnyhq.io\/blog\/wordpress-redirects\/\">this blog that\u2019s ranking #1<\/a>, explain each of the above bullets to touch on the <em>why<\/em> you should implement a redirect&nbsp;<\/li>\n<\/ul>\n\n\n\n<h2 id=\"toc-types-of-redirects\" class=\"wp-block-heading\">Types of redirects<\/h2>\n\n\n\n<p>Since there are quite a few ways to use a redirect, it makes sense that there are also several different types. Let\u2019s take a look at the most common redirect methods you might need to use.&nbsp;<\/p>\n\n\n\n<p>There are various types of redirects you can use, so it\u2019s important to know the differences between them. Let\u2019s review some of the most basic types of redirects.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><strong>301 Permanent Redirect. <\/strong><\/strong>This is the redirect you\u2019ll want to use if you are permanently moving or deleting a page. You may use this if you move your website from one URL to another or switch it to a new hosting service. This will guide visitors to the new URL and help you maintain a <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/ahrefs.com\/blog\/301-redirects\/\">respectable page rank<\/a>.&nbsp;This is the most SEO-friendly redirect for a broken link.<\/li>\n\n\n\n<li><strong><strong>302 Temporary Redirect. <\/strong><\/strong>The 302 redirect is a temporary redirect that should be used with caution and tested for browser compatibility. Essentially, this redirect tells the user that the file they are looking for exists, but for some reason it\u2019s not loading properly. Users are then offered an alternative option. For long-term use, these redirects can carry SEO penalties. However, you may wish to use them for staging environments and other temporary sites.<\/li>\n\n\n\n<li><strong>303 See Other. &nbsp;<\/strong>In terms of security, the 303 redirect is pretty important. It is used to replace the 302 redirect when problems arise. This type of redirect prevents users from submitting the same information more than once. Once they submit their information, they\u2019ll be redirected to a different page. You can also prevent bookmarking or refreshing sensitive data such as credit card information. This is intended to prevent users from mistakes such as accidentally purchasing the same item twice.<\/li>\n\n\n\n<li><strong>307. <\/strong>This redirect is nearly identical in functionality and purpose to the 303 redirect. The difference lies in how it sends and receives information. The 307 uses only one data exchange, and is a true temporary redirect. On the other hand, a 303 redirect employs two methods, and offers the <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Status\/307\">\u2018see other\u2019 response<\/a>.&nbsp;<\/li>\n\n\n\n<li><strong>308. <\/strong>Like the 301 redirect, this is a permanent redirect. It\u2019s used when a file location has changed. The difference between the two is that a 301 can change the <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/www.w3schools.com\/tags\/ref_httpmethods.asp\">HyperText Transfer Protocol (HTTP)<\/a> method from POST to GET, while 308 can only use the POST method.&nbsp;<\/li>\n\n\n\n<li><strong>404 Not Found.<\/strong> This redirects any broken or missing link to another page, such as a 404 error page or your site\u2019s home page. This enables users to keep browsing your site even if they try to access a missing page.<\/li>\n\n\n\n<li><strong>HTTP to HTTPS Redirect.<\/strong> An HTTPS URL has advantages over an HTTP URL, both in terms of security and SEO. To force browsers to display the HTTPS version of your pages, however, you\u2019ll need to <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"internal\" href=\"https:\/\/wpengine.com\/resources\/what-are-ssl-certificates\/\" target=\"_blank\" rel=\"noreferrer noopener\">set up a redirect<\/a>.<\/li>\n<\/ul>\n\n\n\n<p>Some of these redirect types are more common than others, but all of them have their uses. Understanding how each redirect performs can help you employ the best one for your specific scenario. Setting them up by hand can be tricky, though, which is where plugins come into play.<\/p>\n\n\n\n<h2 id=\"toc-how-to-create-a-301-redirect-in-wordpress-using\" class=\"wp-block-heading\">How to create a 301 redirect in WordPress Using .<em>htaccess<\/em><\/h2>\n\n\n\n<p>WordPress offers various methods for page redirection. You can use a plugin or change your site\u2019s .<em>htaccess<\/em> file. The method you choose will depend on the type of redirect you need, your hosting provider\u2019s settings, and your comfort level with making changes to a core file.<\/p>\n\n\n\n<p>As we covered earlier, a 301 redirect is used to permanently forward one URL to another, unlike 302 redirects (which are temporary). This means that search engines will default to the page at the new location, and index it appropriately. This type of redirect prevents your site from losing search engine rankings. Let\u2019s break down a few steps you\u2019ll need in order to take this approach.&nbsp;<\/p>\n\n\n\n<h3 id=\"toc-step-1-verify-your-web-hosts-htaccess-editing-rules\" class=\"wp-block-heading\">Step 1: Verify Your Web Host\u2019s <em>.htaccess <\/em>Editing Rules<\/h3>\n\n\n\n<p>The <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/support\/article\/htaccess\/\">.<em>htaccess<\/em> file<\/a> is a configuration file that tells your server how to display pages from the WordPress root directory. You\u2019ll need to check with your hosting provider before making changes to .<em>htaccess<\/em>, as there may be rules about what alterations you can make. If you have a plan here at WP Engine, we recommend using our <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"internal\" href=\"https:\/\/wpengine.com\/support\/redirect\/\">Redirect Rules tool<\/a>.<\/p>\n\n\n\n<h3 id=\"toc-step-2-make-a-backup-of-your-site-and\" class=\"wp-block-heading\">Step 2: Make a backup of your site and download your <em>.htaccess<\/em> file<\/h3>\n\n\n\n<p>To create a 301 redirect in<em> .htaccess<\/em>, you will need to <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"internal\" href=\"https:\/\/wpengine.com\/support\/sftp\/\">use a File Transfer Protocol (FTP) client<\/a> to access the file on your server. We recommend<a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/filezilla-project.org\/\"> FileZilla<\/a>. Before you get started, you\u2019ll also want to make sure you have a<a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"internal\" href=\"https:\/\/wpengine.com\/support\/restore\/\"> backup of your site<\/a> in place.<\/p>\n\n\n\n<p>Then, use FileZilla to navigate to your site\u2019s root directory:<\/p>\n\n\n\n<p>From there, download your .<em>htaccess<\/em> file. You\u2019ll want to create a copy, in case you make a mistake and need to restore the original. Then at the top of the file, add the following line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Redirect 301 \/current-page.html http:\/\/www.yoursite.com\/new-page\/<\/pre>\n\n\n\n<p>This redirect will change your URLs from <em>http:\/\/www.yoursite.com\/current-page<\/em> to <em>http:\/\/www.yoursite.com\/new-page<\/em> (you\u2019ll need to replace the placeholders with your site\u2019s information). When adding your redirects, remember that you can only have one per line in the .<em>htaccess<\/em> file.<\/p>\n\n\n\n<h2 id=\"toc-how-to-redirect-a-page-with-a-wordpress-plugin\" class=\"wp-block-heading\">How to redirect a page with a WordPress plugin<\/h2>\n\n\n\n<p>If you\u2019re hesitant about messing around with your core website files, you may want to consider using a plugin to do so. We\u2019ll go over several different plugin options later in greater detail. However, to give you a quick overview of how to set up a redirect with a plugin, we\u2019ll use the <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/plugins\/redirection\/\">Redirection plugin<\/a> as an example:<\/p>\n\n\n\n<p>Your first step will be to <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/support\/article\/managing-plugins\/\">install and activate<\/a> the plugin in your WordPress dashboard. Once you\u2019ve done that, you\u2019ll need to click through a few items in its <em>Basic Setup<\/em> process.<\/p>\n\n\n\n<p>Once you\u2019ve clicked through these steps, you\u2019ll be taken to the Redirection plugin <em>Options<\/em> page.<\/p>\n\n\n\n<p>From the <em>Options<\/em> page you can choose between several different features. Let\u2019s first click on the <em>Redirects<\/em> link, and see how to add a new redirection to your website.<\/p>\n\n\n\n<p>Similar to adding a new post, you can click <em>Add New<\/em> on the Redirection management page and fill in a bit of information about your redirect. This includes your <em>Source URL<\/em> and<em> Target URL.<\/em> You\u2019ll also be able to define how you want the redirect to handle the parameters you set and assign it to any redirection <em>Groups<\/em> you\u2019ve created.&nbsp;<\/p>\n\n\n\n<p>Once you\u2019ve completed filling in these fields, you can click on <em>Add Redirect<\/em> as seen in the above image. Then you\u2019ll be all set!<\/p>\n\n\n\n<h2 id=\"toc-wordpress-redirect-plugins\" class=\"wp-block-heading\">WordPress redirect plugins<\/h2>\n\n\n\n<p>As we mentioned, the<a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/plugins\/\"> WordPress Plugin Directory<\/a> offers many plugins for adding redirects to your site.<\/p>\n\n\n\n<p>When choosing a plugin for this purpose, be sure to research each one to make sure it\u2019s well reviewed, widely used, and actively updated. Below, we\u2019ll recommend some plugins that can help with each redirect scenario.<\/p>\n\n\n\n<h3 id=\"toc-1-redirection\" class=\"wp-block-heading\">1. <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/plugins\/redirection\/\">Redirection<\/a><\/h3>\n\n\n\n<p>This plugin is helpful for beginners, and can be used to forward any URL easily. Since we used <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/plugins\/redirection\/\">Redirection<\/a> in our previous example, you already know what the interface looks like. It\u2019s important to know that this plugin in particular is focused on managing 301 redirects and keeping track of 404 errors.<\/p>\n\n\n\n<p>Additionally, you can use Redirection to create redirects based on certain conditions, such as a user\u2019s login status or IP address. This is a truly free plugin with no premium upgrade, so the features you get are the only ones they offer. However, if you need to manage other kinds of redirects, you might need to investigate another option.&nbsp;<\/p>\n\n\n\n<h3 id=\"toc-2-safe-redirect-manager\" class=\"wp-block-heading\">2. <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/plugins\/safe-redirect-manager\/\">Safe Redirect Manager<\/a><\/h3>\n\n\n\n<p>The <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/plugins\/safe-redirect-manager\/\">Safe Redirect Manager<\/a> plugin is a very straightforward and barebones approach to creating redirects. You\u2019ll access the manager through your <em>Tools<\/em> menu in WordPress, and simply provide information about where the redirect is from and where it\u2019s going. You\u2019ll also be able to set the HTTP status code for the kind of redirect you want to use.&nbsp;<\/p>\n\n\n\n<p>While this plugin can be used for large-scale redirects, you might want to test it out before implementing it across a lot of pages. Reviews are good, but there is some indication that it might struggle a little at an enterprise level. With that being said, this is a well-supported and frequently downloaded plugin that can help you set up a redirect very quickly.&nbsp;<\/p>\n\n\n\n<h3 id=\"toc-3-301-redirects-easy-redirect-manager\" class=\"wp-block-heading\">3. <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/plugins\/eps-301-redirects\/\">301 Redirects \u2013 Easy Redirect Manager<\/a><\/h3>\n\n\n\n<p>The <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/plugins\/eps-301-redirects\/\">301 Redirects \u2013 Easy Redirect Manager<\/a> plugin is a free option designed to help you manage both 301 and 302 redirects. This can come in handy if you\u2019ve reorganized an existing website, or are just starting out. Additionally, if you have content that expires, this can save your users from running into 404 errors.&nbsp;<\/p>\n\n\n\n<p>Another benefit this plugin offers is that you can create custom URLs for your redirect destinations. You can also choose to redirect almost all of the WordPress content types, including categories and archives, and access helpful stats about the amount of redirection being used on your website.<\/p>\n\n\n\n<h3 id=\"toc-4-yoast-seo\" class=\"wp-block-heading\"><strong>4. <\/strong><a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/plugins\/wordpress-seo\/\"><strong>Yoast SEO<\/strong><\/a><\/h3>\n\n\n\n<p>The <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/yoast.com\/wordpress\/plugins\/seo\/\">Yoast SEO plugin\u2019s premium version<\/a> comes with <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/yoast.com\/create-301-redirect-wordpress\/\">a Redirect Manager<\/a>, which has plenty of useful options for page redirects. When you delete a post or page, this tool automatically asks you where you\u2019d like to redirect its old link to and what kind of redirect you\u2019d like to use (temporary or permanent).<\/p>\n\n\n\n<p>On the downside, Yoast SEO can be somewhat costly, at $89 per month for one site. However, Yoast SEO\u2019s other excellent features can make it a valuable investment for many WordPress users.<\/p>\n\n\n\n<h2 id=\"toc-what-is-a-server-side-redirect\" class=\"wp-block-heading\">What Is a server-side redirect?<\/h2>\n\n\n\n<p>There are certain situations when you\u2019ll need to place a 301 redirect at the server level so that it can be enforced across the entire website. This technique is most commonly used when redirecting a site <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"internal\" href=\"https:\/\/wpengine.com\/resources\/what-are-ssl-certificates\/\">from HTTP to HTTPS<\/a>, or from a www to a non-www domain.<\/p>\n\n\n\n<h3 id=\"toc-how-to-redirect-http-to-https-in-wordpress\" class=\"wp-block-heading\">How to redirect HTTP to HTTPS in WordPress<\/h3>\n\n\n\n<p>If you\u2019ve <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"internal\" href=\"https:\/\/wpengine.com\/resources\/what-are-ssl-certificates\/\">installed an SSL certificate<\/a> and successfully migrated your site to its new HTTPS domain, you\u2019ll still need to create a server-side redirect. First, you\u2019ll need to locate and download <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"internal\" href=\"https:\/\/wpengine.com\/support\/htaccess\/\">your site\u2019s <em>.htaccess<\/em> file<\/a>. Once there, add the following code at the top of the page:<\/p>\n\n\n\n<p><code>RewriteEngine on<br>RewriteCond %{HTTP_HOST} ^yoursite.com [NC,OR]<br>RewriteCond %{HTTP_HOST} ^www.yoursite.com [NC]<br>RewriteRule ^(.*)$ https:\/\/www.yoursite.com\/$1 [L,R=301,NC]<\/code><\/p>\n\n\n\n<p>This code changes every URL under your previous domain to a secure counterpart. If you\u2019d prefer to use a plugin to do this, we recommend<a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/plugins\/really-simple-ssl\/\"> Really Simple SSL<\/a>.<\/p>\n\n\n\n<p>This plugin automatically detects your site\u2019s settings, and then configures them to run over HTTPS. As long as you have a<a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"internal\" href=\"https:\/\/wpengine.com\/support\/add-ssl-site\/\"> valid SSL certificate<\/a>, it will take care of the rest for you.<\/p>\n\n\n\n<p>Once you<a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/plugins\/really-simple-ssl\/#installation\"> install and activate the plugin<\/a>, you\u2019ll get a notice asking you to enable SSL. Click the button, and log back into your account. That\u2019s it!<\/p>\n\n\n\n<h3 id=\"toc-www-to-non-www-redirection\" class=\"wp-block-heading\">WWW to non-WWW redirection<\/h3>\n\n\n\n<p>To redirect your pages to non-www URLs, you\u2019ll need to apply the change at the full-site level. This redirect helps you avoid page duplication and poor user experience. To redirect www to non-www in your <em>.htaccess<\/em> file, you\u2019ll need to enter the following lines at the top:<\/p>\n\n\n\n<p>R<code>ewriteEngine On<br>RewriteBase \/<br>RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]<br>RewriteRule ^(.*)$ http:\/\/%1\/$1 [R=301,L]<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/wpengine.com\/wp-content\/uploads\/2017\/12\/redirect6.jpg\" alt=\"www to non-www redirect\" class=\"wp-image-2662\"><\/figure>\n\n\n\n<p>If you\u2019re looking for a plugin that can help you do this, we again recommend Really Simple SSL. However, there\u2019s also a<a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/github.com\/wp-media\/wp-rocket-helpers\"> WP Rocket helper plugin<\/a> available through GitHub that is highly recommended by the developer community. This plugin enables you to redirect<a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"http:\/\/docs.wp-rocket.me\/article\/40-fixing-non-www-redirection\"> www to non-www<\/a> and vice versa, by adding the correct code for you.<\/p>\n\n\n\n<h2 id=\"toc-how-to-redirect-a-domain-in-wordpress\" class=\"wp-block-heading\">How to redirect a domain in WordPress<\/h2>\n\n\n\n<p>If you\u2019re moving your WordPress site to an entirely new domain, you\u2019ll need to perform a domain redirect to avoid losing your content\u2019s SEO. These instructions assume that you\u2019ve backed up your site and<a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/wordpress.org\/support\/article\/moving-wordpress\/\"> moved it to its new domain<\/a>.<\/p>\n\n\n\n<p>To perform this redirect, open up your <em>.htaccess<\/em> file, and add this code to the top:<\/p>\n\n\n\n<p><code>#Options +FollowSymLinks<br>RewriteEngine on<br>RewriteRule ^(.*)$ http:\/\/www.newsite.COM\/$1 [R=301,L]<\/code><\/p>\n\n\n\n<p>Use your new domain in place of <em>newsite.com<\/em>, and then save the file. You can also use any of the above-mentioned plugins to accomplish this task, as long as you activate it on your old site.<\/p>\n\n\n\n<h2 id=\"toc-how-to-minimize-redirects-in-wordpress\" class=\"wp-block-heading\">How to minimize redirects in WordPress<\/h2>\n\n\n\n<p>While there are some legitimate and necessary uses for redirects, it\u2019s also a good practice to minimize the need for them wherever possible. This is especially true if the redirect slows down your page loading times, as most web users expect pages to load in <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/neilpatel.com\/blog\/loading-time\/\">two seconds or less<\/a>.<\/p>\n\n\n\n<p>If a user encounters a redirect, they might immediately think they\u2019ve gone off course and leave your website altogether. For this reason, it\u2019s best to not link your content to known redirects, as it might create a <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"outbound\" href=\"https:\/\/www.liquidweb.com\/kb\/troubleshooting-too-many-redirects\/\">frustrating redirect loop<\/a>. If you\u2019ve recently completed a major overhaul of your website, you can use the Redirection plugin to monitor, log, and fix redirect errors that might be causing problems.&nbsp;<\/p>\n\n\n\n<h2 id=\"toc-keep-your-website-on-track-with-wp-engine\" class=\"wp-block-heading\">Keep your website on track with WP Engine<\/h2>\n\n\n\n<p>If you need any help configuring redirects on your WordPress site, don\u2019t hesitate to <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"internal\" href=\"https:\/\/wpengine.com\/contact\/\">contact us<\/a>. WP Engine offers top resources for developers and can help you create an incredible digital experience for your own customers. We have several developer resources as well and <a data-analytics-action-type=\"link\" data-analytics-link-location=\"Post Content\" data-analytics-link-type=\"internal\" href=\"https:\/\/wpengine.com\/plans\/\">offer plans<\/a> that are suitable for a wide variety of needs<\/p>","protected":false},"excerpt":{"rendered":"<p>If you\u2019ve redesigned your WordPress website or made revisions to its permalink structure, chances are that many of your URLs have changed. This is an issue for search engines and users alike.&nbsp; Fortunately, WordPress redirects offer a simple solution. When you use a redirect, your visitors won\u2019t be negatively impacted, and you\u2019ll be able to [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":2661,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"mediapress_draft_name":"","_mediapress_is_draft_copy":false,"footnotes":""},"audience":[],"blog-category":[121],"buyer-stage":[],"company-and-culture":[],"content-type":[54],"location":[],"persona":[106],"product":[],"topic":[100],"use-cases":[],"class_list":["post-4281","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","blog-category-best-practices","content-type-blog","persona-developer","topic-wordpress"],"time_to_read":13,"acf":{"hero_image_alt_text":"","display_author_bio":false,"featured_on_hub_page":false,"featured_on_tag_page":false,"featured_on_category_page":false,"wp_engine_pick":false,"taxonomy_selector":{"":null,"taxonomy-audience":false,"taxonomy-buyer-stage":false,"taxonomy-company-and-culture":false,"taxonomy-content-type":[54],"taxonomy-location":false,"taxonomy-persona":[106],"taxonomy-product":false,"taxonomy-topic":[100],"taxonomy-use-cases":false}},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WordPress Redirects: 301s, HTTP to HTTPS and WWW | WP Engine\u00ae<\/title>\n<meta name=\"description\" content=\"Learn about how to 301 redirect WordPress pages, posts, domains, HTTP to HTTPS and WWW vs. non-WWW. WP Engine makes WordPress 301 redirects easy &amp; painless!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wpengine.com\/blog\/wordpress-redirects\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress Redirects: 301s, HTTP to HTTPS and WWW | WP Engine\u00ae\" \/>\n<meta property=\"og:description\" content=\"Learn about how to 301 redirect WordPress pages, posts, domains, HTTP to HTTPS and WWW vs. non-WWW. WP Engine makes WordPress 301 redirects easy &amp; painless!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/blog\/wordpress-redirects\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\u00ae\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-14T10:31:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/wp-content\/uploads\/2022\/03\/redirect.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1\" \/>\n\t<meta property=\"og:image:height\" content=\"1\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"WP Engine\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wpengine\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"WP Engine\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/blog\\\/wordpress-redirects\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/blog\\\/wordpress-redirects\\\/\"},\"author\":{\"name\":\"WP Engine\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/#\\\/schema\\\/person\\\/bf22ca48719dba40ad1a1d4161eb01e9\"},\"headline\":\"WordPress Redirects: a Complete Guide\",\"datePublished\":\"2022-03-14T10:31:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/blog\\\/wordpress-redirects\\\/\"},\"wordCount\":2578,\"publisher\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/blog\\\/wordpress-redirects\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wpengine.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/redirect.png\",\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/blog\\\/wordpress-redirects\\\/\",\"url\":\"https:\\\/\\\/wpengine.com\\\/blog\\\/wordpress-redirects\\\/\",\"name\":\"WordPress Redirects: 301s, HTTP to HTTPS and WWW | WP Engine\u00ae\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/blog\\\/wordpress-redirects\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/blog\\\/wordpress-redirects\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wpengine.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/redirect.png\",\"datePublished\":\"2022-03-14T10:31:00+00:00\",\"description\":\"Learn about how to 301 redirect WordPress pages, posts, domains, HTTP to HTTPS and WWW vs. non-WWW. WP Engine makes WordPress 301 redirects easy & painless!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/blog\\\/wordpress-redirects\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wpengine.com\\\/blog\\\/wordpress-redirects\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/blog\\\/wordpress-redirects\\\/#primaryimage\",\"url\":\"https:\\\/\\\/wpengine.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/redirect.png\",\"contentUrl\":\"https:\\\/\\\/wpengine.com\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/redirect.png\",\"caption\":\"How to set up redirects in WordPress. Image depicts the corner of a laptop. There is a sticky note on it that reads Error 404\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/blog\\\/wordpress-redirects\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wpengine.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WordPress Redirects: a Complete Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/#website\",\"url\":\"https:\\\/\\\/wpengine.com\\\/\",\"name\":\"WP Engine\u00ae\",\"description\":\"Managed Hosting for WordPress\",\"publisher\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wpengine.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/#organization\",\"name\":\"WP Engine\",\"url\":\"https:\\\/\\\/wpengine.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/wpengine.com\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/WPEngine_OGImage-1.webp\",\"contentUrl\":\"https:\\\/\\\/wpengine.com\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/WPEngine_OGImage-1.webp\",\"width\":1200,\"height\":630,\"caption\":\"WP Engine\"},\"image\":{\"@id\":\"https:\\\/\\\/wpengine.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/wpengine\\\/\",\"https:\\\/\\\/x.com\\\/wpengine\",\"https:\\\/\\\/www.instagram.com\\\/wpengine\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/wpengine\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCJeAEAxX69v24CUBZ0WBYSg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/wpengine.com\\\/#\\\/schema\\\/person\\\/bf22ca48719dba40ad1a1d4161eb01e9\",\"name\":\"WP Engine\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g\",\"caption\":\"WP Engine\"},\"url\":\"https:\\\/\\\/wpengine.com\\\/blog\\\/author\\\/wp-engine\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress Redirects: 301s, HTTP to HTTPS and WWW | WP Engine\u00ae","description":"Learn about how to 301 redirect WordPress pages, posts, domains, HTTP to HTTPS and WWW vs. non-WWW. WP Engine makes WordPress 301 redirects easy & painless!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/","og_locale":"en_US","og_type":"article","og_title":"WordPress Redirects: 301s, HTTP to HTTPS and WWW | WP Engine\u00ae","og_description":"Learn about how to 301 redirect WordPress pages, posts, domains, HTTP to HTTPS and WWW vs. non-WWW. WP Engine makes WordPress 301 redirects easy & painless!","og_url":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/","og_site_name":"WP Engine\u00ae","article_publisher":"https:\/\/www.facebook.com\/wpengine\/","article_published_time":"2022-03-14T10:31:00+00:00","og_image":[{"url":"https:\/\/wpengine.com\/wp-content\/uploads\/2022\/03\/redirect.png","width":1,"height":1,"type":"image\/png"}],"author":"WP Engine","twitter_card":"summary_large_image","twitter_creator":"@wpengine","twitter_site":"@wpengine","twitter_misc":{"Written by":"WP Engine","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/#article","isPartOf":{"@id":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/"},"author":{"name":"WP Engine","@id":"https:\/\/wpengine.com\/#\/schema\/person\/bf22ca48719dba40ad1a1d4161eb01e9"},"headline":"WordPress Redirects: a Complete Guide","datePublished":"2022-03-14T10:31:00+00:00","mainEntityOfPage":{"@id":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/"},"wordCount":2578,"publisher":{"@id":"https:\/\/wpengine.com\/#organization"},"image":{"@id":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/#primaryimage"},"thumbnailUrl":"https:\/\/wpengine.com\/wp-content\/uploads\/2022\/03\/redirect.png","inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/","url":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/","name":"WordPress Redirects: 301s, HTTP to HTTPS and WWW | WP Engine\u00ae","isPartOf":{"@id":"https:\/\/wpengine.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/#primaryimage"},"image":{"@id":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/#primaryimage"},"thumbnailUrl":"https:\/\/wpengine.com\/wp-content\/uploads\/2022\/03\/redirect.png","datePublished":"2022-03-14T10:31:00+00:00","description":"Learn about how to 301 redirect WordPress pages, posts, domains, HTTP to HTTPS and WWW vs. non-WWW. WP Engine makes WordPress 301 redirects easy & painless!","breadcrumb":{"@id":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/blog\/wordpress-redirects\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/#primaryimage","url":"https:\/\/wpengine.com\/wp-content\/uploads\/2022\/03\/redirect.png","contentUrl":"https:\/\/wpengine.com\/wp-content\/uploads\/2022\/03\/redirect.png","caption":"How to set up redirects in WordPress. Image depicts the corner of a laptop. There is a sticky note on it that reads Error 404"},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/blog\/wordpress-redirects\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/"},{"@type":"ListItem","position":2,"name":"WordPress Redirects: a Complete Guide"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/#website","url":"https:\/\/wpengine.com\/","name":"WP Engine\u00ae","description":"Managed Hosting for WordPress","publisher":{"@id":"https:\/\/wpengine.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/wpengine.com\/#organization","name":"WP Engine","url":"https:\/\/wpengine.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/#\/schema\/logo\/image\/","url":"https:\/\/wpengine.com\/wp-content\/uploads\/2025\/09\/WPEngine_OGImage-1.webp","contentUrl":"https:\/\/wpengine.com\/wp-content\/uploads\/2025\/09\/WPEngine_OGImage-1.webp","width":1200,"height":630,"caption":"WP Engine"},"image":{"@id":"https:\/\/wpengine.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/wpengine\/","https:\/\/x.com\/wpengine","https:\/\/www.instagram.com\/wpengine\/","https:\/\/www.linkedin.com\/company\/wpengine\/","https:\/\/www.youtube.com\/channel\/UCJeAEAxX69v24CUBZ0WBYSg"]},{"@type":"Person","@id":"https:\/\/wpengine.com\/#\/schema\/person\/bf22ca48719dba40ad1a1d4161eb01e9","name":"WP Engine","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g","caption":"WP Engine"},"url":"https:\/\/wpengine.com\/blog\/author\/wp-engine\/"}]}},"mediapress_workflow_parent_id":null,"_links":{"self":[{"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/posts\/4281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/comments?post=4281"}],"version-history":[{"count":0,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/posts\/4281\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/media\/2661"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/media?parent=4281"}],"wp:term":[{"taxonomy":"audience","embeddable":true,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/audience?post=4281"},{"taxonomy":"blog-category","embeddable":true,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/blog-category?post=4281"},{"taxonomy":"buyer-stage","embeddable":true,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/buyer-stage?post=4281"},{"taxonomy":"company-and-culture","embeddable":true,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/company-and-culture?post=4281"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/content-type?post=4281"},{"taxonomy":"location","embeddable":true,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/location?post=4281"},{"taxonomy":"persona","embeddable":true,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/persona?post=4281"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/product?post=4281"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/topic?post=4281"},{"taxonomy":"use-cases","embeddable":true,"href":"https:\/\/wpengine.com\/wp-json\/wp\/v2\/use-cases?post=4281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}