{"id":9774,"date":"2024-10-07T12:19:10","date_gmt":"2024-10-07T12:19:10","guid":{"rendered":"https:\/\/wpx.net\/kb\/?post_type=ht_kb&#038;p=9774"},"modified":"2025-07-18T10:37:11","modified_gmt":"2025-07-18T10:37:11","slug":"how-can-i-add-a-301-htaccess-redirect","status":"publish","type":"ht_kb","link":"https:\/\/wpx.net\/kb\/how-can-i-add-a-301-htaccess-redirect\/","title":{"rendered":"How can I add a 301 .htaccess redirect?"},"content":{"rendered":"\n<p>A 301 redirect is a permanent redirection from one URL to another. It tells both browsers and search engines that a page has permanently moved to a new location. This type of redirect helps preserve your website\u2019s SEO value by transferring most of the original page\u2019s ranking power (link equity) to the new URL.<\/p>\n\n\n\n<p>301 redirects are commonly used when you change your site\u2019s structure, move content to a new URL, delete pages, or switch to a new domain. They ensure users don\u2019t land on broken or outdated links and help search engines update their index accordingly.<\/p>\n\n\n\n<p>However, it\u2019s important to note that while a 301 redirect passes most SEO value, it doesn&#8217;t guarantee that all ranking signals will transfer fully or immediately. It also won\u2019t fix issues like duplicate content or poor site structure\u2014those still need to be addressed separately.<\/p>\n\n\n\n<p>This guide will show you how to set up a 301 redirect through your .htaccess file.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">The domain you want to set up a redirect for <strong>must first be added as a website<\/strong> in your hosting service.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-1-login-to-your-wpx-account\">Step 1. Log in to your WPX account<\/h2>\n\n\n\n<p>Begin by logging into your WPX account. You can do this by visiting the <strong><a href=\"https:\/\/wpx.net\/clientarea\/\" target=\"_blank\" rel=\"noreferrer noopener\">WPX login page<\/a>.\u200b<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-2-navigate-to-your-hosting-plan\">Step 2. Go to Control Panel<\/h2>\n\n\n\n<p>Once logged in:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Locate your hosting plan in the WPX client area.<\/li>\n\n\n\n<li>Click the <strong>Control Panel<\/strong> button next to the plan you wish to manage.<\/li>\n<\/ol>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a0357a29f736&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a0357a29f736\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1919\" height=\"796\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/wpx.net\/kb\/wp-content\/uploads\/2025\/03\/image-10.png\" alt=\"\" class=\"wp-image-12899\" srcset=\"https:\/\/wpx.net\/kb\/wp-content\/uploads\/2025\/03\/image-10.png 1919w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2025\/03\/image-10-300x124.png 300w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2025\/03\/image-10-1024x425.png 1024w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2025\/03\/image-10-768x319.png 768w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2025\/03\/image-10-50x21.png 50w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2025\/03\/image-10-1536x637.png 1536w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2025\/03\/image-10-60x25.png 60w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2025\/03\/image-10-100x41.png 100w\" sizes=\"auto, (max-width: 1919px) 100vw, 1919px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">If you have more than five hosting plans of the same type (WordPress, Agency or WooCommerce), not all may appear on the homepage. Use the <strong>WordPress Hosting<\/strong>, <strong>Agency Hosting<\/strong> or <strong>WooCommerce Hosting<\/strong> tab in the left-hand menu to find your service.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-3-open-file-manager\">Step 3. Open File Manager<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Navigate to <strong>FTP Users &amp; Files<\/strong>.<\/li>\n\n\n\n<li>Click on the <strong>File Manager<\/strong> button. This will open a<em> new tab<\/em> with our File Manager.<\/li>\n<\/ol>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a0357a29ff1c&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a0357a29ff1c\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1910\" height=\"851\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/wpx.net\/kb\/wp-content\/uploads\/2022\/02\/image-147.png\" alt=\"\" class=\"wp-image-12946\" srcset=\"https:\/\/wpx.net\/kb\/wp-content\/uploads\/2022\/02\/image-147.png 1910w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2022\/02\/image-147-300x134.png 300w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2022\/02\/image-147-1024x456.png 1024w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2022\/02\/image-147-768x342.png 768w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2022\/02\/image-147-50x22.png 50w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2022\/02\/image-147-1536x684.png 1536w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2022\/02\/image-147-60x27.png 60w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2022\/02\/image-147-100x45.png 100w\" sizes=\"auto, (max-width: 1910px) 100vw, 1910px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-4-edit-the-file\">Step 4. Edit the .htaccess file<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Navigate to the folder of the website where you want to set up the redirect.<\/li>\n\n\n\n<li>Open the <strong>public_html <\/strong>directory and locate the <strong>.htaccess <\/strong>file.<\/li>\n\n\n\n<li>Open the <strong>.htaccess<\/strong> file. <em>Double-click<\/em> the file or<em> right-click<\/em> and select <strong>Edit <\/strong>to open it.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">If the site you need to access is <strong>not <\/strong>your primary one, please first navigate to the <strong>domains <\/strong>folder.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a0357a2a0631&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a0357a2a0631\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1917\" height=\"843\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/htaccess-access.png\" alt=\"\" class=\"wp-image-10740\" srcset=\"https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/htaccess-access.png 1917w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/htaccess-access-300x132.png 300w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/htaccess-access-1024x450.png 1024w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/htaccess-access-768x338.png 768w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/htaccess-access-50x22.png 50w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/htaccess-access-1536x675.png 1536w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/htaccess-access-60x26.png 60w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/htaccess-access-100x44.png 100w\" sizes=\"auto, (max-width: 1917px) 100vw, 1917px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5. Setup the Redirect<\/h2>\n\n\n\n<p>If you&#8217;re not sure how to write the redirect rule manually, you can use an <a href=\"https:\/\/www.webconfs.com\/seo-tools\/htaccess-301-redirect-tool\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>online tool<\/strong><\/a><a href=\"https:\/\/www.webconfs.com\/seo-tools\/htaccess-301-redirect-tool\/\" target=\"_blank\" rel=\"noopener\"> <\/a>to generate the correct syntax for you. Once you have the rule ready, you\u2019ll need to add it to your <em>.htaccess <\/em>file.<\/p>\n\n\n\n<p>When editing the<em> .htaccess<\/em> file, it\u2019s best to place new redirect rules <strong>at the top<\/strong>. Also, be sure to <strong>leave a blank line between each rule<\/strong>\u2014this keeps the file readable and helps avoid conflicts between rules.<\/p>\n\n\n\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6a0357a2a0a5a&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6a0357a2a0a5a\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1917\" height=\"863\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/redirect-4.png\" alt=\"\" class=\"wp-image-10766\" srcset=\"https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/redirect-4.png 1917w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/redirect-4-300x135.png 300w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/redirect-4-1024x461.png 1024w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/redirect-4-768x346.png 768w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/redirect-4-50x23.png 50w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/redirect-4-1536x691.png 1536w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/redirect-4-60x27.png 60w, https:\/\/wpx.net\/kb\/wp-content\/uploads\/2024\/10\/redirect-4-100x45.png 100w\" sizes=\"auto, (max-width: 1917px) 100vw, 1917px\" \/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\taria-label=\"Enlarge\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.imageButtonRight\"\n\t\t\tdata-wp-style--top=\"state.imageButtonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon\">After saving the changes, make sure to <strong>clear both your website and browser cache<\/strong>. Then, you can test the redirect by opening the site in a different browser or in Incognito\/Private mode. You can also use an <a href=\"https:\/\/www.redirect-checker.org\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>online tool<\/strong> <\/a>to confirm that the redirect is working correctly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Should You Use a Plugin for 301 Redirects?<\/h2>\n\n\n\n<p>While using the <em>.htaccess<\/em> file is the most efficient way to set up 301 redirects (since they\u2019re handled directly by the server), using a plugin has its own advantages\u2014especially for larger sites or non-technical users.<\/p>\n\n\n\n<p>If you&#8217;re managing dozens or hundreds of redirects, a plugin can make your life easier by offering:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A simple, user-friendly interface<\/li>\n\n\n\n<li>Bulk redirect management<\/li>\n\n\n\n<li>Import\/export options<\/li>\n\n\n\n<li>Logs and redirect tracking<\/li>\n\n\n\n<li>Easy editing without touching server files<\/li>\n<\/ul>\n\n\n\n<p>Plugins are slightly less performant because they process redirects through PHP, but for most websites, the difference is negligible. If convenience, flexibility, and ease of use are important to you\u2014a plugin is a great option.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">301 redirects are essential for preserving SEO when URLs change, but they should be used carefully. You can create them manually via the .htaccess file for better performance, or use a plugin for easier management\u2014especially if you&#8217;re handling many redirects.<br><br>However, plugin-based redirects rely on PHP, may slightly impact loading speed, and will stop working if the plugin is deactivated. Improper redirect setup via a plugin or in .htaccess can also lead to issues like redirect loops or the \u201ctoo many redirects\u201d error, which can break your site\u2019s accessibility.<br><br>If you\u2019re unsure about making these changes, it\u2019s always best to contact our support team for assistance.<\/p>\n\n\n\n<p>Have more questions? Contact the WPX Support Team through the live chat widget in the bottom-right corner, and they\u2019ll assist you promptly, typically within 30 seconds.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A 301 redirect is a permanent redirection from one URL to another. It tells both browsers and search engines that a page has permanently moved to a new location. This type of redirect helps preserve your website\u2019s SEO value by transferring most of the original page\u2019s ranking power (link equity)&#8230;<\/p>\n","protected":false},"author":16,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","inline_featured_image":false,"footnotes":""},"ht-kb-category":[30],"ht-kb-tag":[],"class_list":["post-9774","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-website-help"],"_links":{"self":[{"href":"https:\/\/wpx.net\/kb\/wp-json\/wp\/v2\/ht-kb\/9774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpx.net\/kb\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/wpx.net\/kb\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/wpx.net\/kb\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/wpx.net\/kb\/wp-json\/wp\/v2\/comments?post=9774"}],"version-history":[{"count":33,"href":"https:\/\/wpx.net\/kb\/wp-json\/wp\/v2\/ht-kb\/9774\/revisions"}],"predecessor-version":[{"id":13618,"href":"https:\/\/wpx.net\/kb\/wp-json\/wp\/v2\/ht-kb\/9774\/revisions\/13618"}],"wp:attachment":[{"href":"https:\/\/wpx.net\/kb\/wp-json\/wp\/v2\/media?parent=9774"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/wpx.net\/kb\/wp-json\/wp\/v2\/ht-kb-category?post=9774"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/wpx.net\/kb\/wp-json\/wp\/v2\/ht-kb-tag?post=9774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}