{"id":18572,"date":"2024-05-24T20:18:31","date_gmt":"2024-05-24T20:18:31","guid":{"rendered":"https:\/\/hostvento.com\/kb\/web-hosting\/getting-started-guide\/how-to-use-the-knowledge-base\/easy-steps-to-create-301-redirect\/"},"modified":"2024-06-17T09:14:43","modified_gmt":"2024-06-17T09:14:43","slug":"easy-steps-to-create-301-redirect","status":"publish","type":"docs","link":"https:\/\/www.hostvento.com\/kb\/docs\/hosting-faqs\/easy-steps-to-create-301-redirect\/","title":{"rendered":"Easy steps to create 301 Redirect"},"content":{"rendered":"\n<p>301 redirect is a type of permanent redirect from one URL to another. 301 redirects users and search engines to a different URL than the one they have actually inserted in their browser.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"># Creating a 301 Redirect Using .htaccess<\/h2>\n\n\n\n<p>1. Log in to&nbsp;<strong>Control Panel<\/strong>.<\/p>\n\n\n\n<p>2. Go to&nbsp;<strong>.htaccess Editor<\/strong>.<\/p>\n\n\n\n<p>3. Go to&nbsp;<strong>Direct Editor<\/strong>.<\/p>\n\n\n\n<p>4. Click on&nbsp;<strong>Change<\/strong>&nbsp;to select in which directory you want to place the 301 redirects.<\/p>\n\n\n\n<p>5. Add any one of the following given code snippets into your&nbsp;<strong>.htaccess file<\/strong>&nbsp;depending on the task that you want to perform :<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1) Old to a new domain<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">RewriteEngine on\n\nRewriteCond %{HTTP_HOST} ^OLDDOMAIN.com [NC,OR]\n\nRewriteCond %{HTTP_HOST} ^www.OLDDOMAIN.com [NC]\n\nRewriteRule ^(.*)$ http:\/\/NEWDOMAIN.net\/$1 [L, R=301,NC]<\/pre>\n\n\n\n<p>It will Update \u201cOLDDOMAIN\u201d to the old domain that you want to redirect to and will update your \u201cNEWDOMAIN\u201d to the domain to which it is already redirecting.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2) Https Redirect :<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">RewriteEngine On\n\nRewriteCond %{HTTP_HOST} ^DOMAIN.com [NC]\n\nRewriteCond %{SERVER_PORT} 80\n\nRewriteRule ^(.*)$ https:\/\/www.DOMAIN.com\/$1 [R=301,L]<\/pre>\n\n\n\n<p>It will Update the \u201cDOMAIN\u201d to the domain that requires the redirect from HTTP to HTTPS.<\/p>\n\n\n\n<p>6. Click on&nbsp;<strong>Save<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">#Creating a 301 Redirect Using IIS Administration Console<\/h2>\n\n\n\n<p>Note: The IIS Administration Console is available on Windows hosting accounts only.<\/p>\n\n\n\n<p>1. Log in to&nbsp;<strong>Control Panel<\/strong>.<\/p>\n\n\n\n<p>2. Go to the&nbsp;<strong>IIS Administration Console<\/strong>.<\/p>\n\n\n\n<p>3. Click on&nbsp;<strong>Change<\/strong>&nbsp;to choose the directory from where you want to redirect.<\/p>\n\n\n\n<p>4. Expand the URL Redirects by clicking on the&nbsp;<strong>\u2018+\u2019<\/strong>&nbsp;button.<\/p>\n\n\n\n<p>5. In the URL text box, enter the&nbsp;<strong>URL<\/strong>&nbsp;that you want to redirect to.<\/p>\n\n\n\n<p>6. Check the&nbsp;<strong>Permanent Redirect<\/strong>.<\/p>\n\n\n\n<p>7. Click on&nbsp;<strong>Set Redirect<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/05\/301-Redirect-min.png\"><img decoding=\"async\" src=\"https:\/\/www.hostvento.com\/kb\/hosting-faqs\/wp-content\/uploads\/2019\/05\/301-Redirect-min.png\" alt=\"301 redirect\" class=\"wp-image-5973\"\/><\/a><\/figure>\n\n\n\n<p>That\u2019s it!<\/p>\n\n\n\n<p>Now, you have successfully created 301 redirects.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>301 redirect is a type of permanent redirect from one URL to another. 301 redirects users and search engines to a different URL than the one they have actually inserted in their browser. # Creating a 301 Redirect Using .htaccess 1. Log in to&nbsp;Control Panel. 2. Go to&nbsp;.htaccess Editor. 3. Go to&nbsp;Direct Editor. 4. Click [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":23377,"menu_order":83,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-18572","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/18572","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/comments?post=18572"}],"version-history":[{"count":3,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/18572\/revisions"}],"predecessor-version":[{"id":20295,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/18572\/revisions\/20295"}],"up":[{"embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/docs\/23377"}],"wp:attachment":[{"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/media?parent=18572"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hostvento.com\/kb\/wp-json\/wp\/v2\/doc_tag?post=18572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}