{"id":22609,"date":"2017-02-06T15:41:42","date_gmt":"2017-02-06T14:41:42","guid":{"rendered":"https:\/\/www.oderland.se\/support\/artikel\/hur-skapar-jag-en-omdirigering\/"},"modified":"2025-02-11T12:05:22","modified_gmt":"2025-02-11T11:05:22","slug":"how-do-i-create-a-redirect","status":"publish","type":"ht_kb","link":"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-create-a-redirect\/","title":{"rendered":"How do I create a redirect?"},"content":{"rendered":"\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">If you are looking for how to set up email forwarders, <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-forward-email\/\" data-type=\"ht_kb\" data-id=\"23978\">see this guide<\/a>.<\/p>\n\n\n\n<p>To create a redirect you need to log on to cPanel, we have a <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-login-to-cpanel\/\" data-type=\"ht_kb\" data-id=\"4236\" target=\"_blank\" rel=\"noreferrer noopener\">guide here<\/a> that shows you how to do that. Then follow the steps below to create a redirect.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click the icon <code>Redirects<\/code> under <code>Domains<\/code>.<br><a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_redirects.png\"><img loading=\"lazy\" decoding=\"async\" width=\"657\" height=\"199\" class=\"wp-image-22613\" style=\"width: 657px;\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_redirects.png\" alt=\"\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_redirects.png 657w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_redirects-300x91.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_redirects-50x15.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_redirects-60x18.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_icon_redirects-100x30.png 100w\" sizes=\"auto, (max-width: 657px) 100vw, 657px\" \/><\/a><\/li>\n\n\n\n<li>You will now see the following: <a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_redirects_details.png\"><img loading=\"lazy\" decoding=\"async\" width=\"625\" height=\"483\" class=\"wp-image-22617\" style=\"width: 625px;\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_redirects_details.png\" alt=\"\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_redirects_details.png 625w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_redirects_details-300x232.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_redirects_details-50x39.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_redirects_details-60x46.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2017\/02\/cpanel_redirects_details-100x77.png 100w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/li>\n\n\n\n<li>Under <code>Type<\/code>, you need to choose what kind of redirect it should be. The most common is 301 which is a permanent redirect, this means that you don&#8217;t plan to remove the redirect in a while. If you are only going to use the redirect for a short while, you can choose 302 temporary.<\/li>\n\n\n\n<li>In the next field, you need to choose which domain you want to redirect from. In our example, we have chosen oderland-demo.se.<\/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 you can&#8217;t find the domain you want to redirect from in the list, you need to <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-add-more-domains-and-or-subdomains-to-my-web-hosting-account\/\" data-type=\"ht_kb\" data-id=\"18526\" target=\"_blank\" rel=\"noreferrer noopener\">add it<\/a> to your web hosting account first.<\/p>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>In the field below it, select whether it is a subpage of the domain you just selected that should be redirected. For example, if you want <strong>oderland-demo.se\/test<\/strong> to be redirected, type <strong>test<\/strong> in that field. If you only want test.se to be redirected, leave that field blank, as in this case.<\/li>\n\n\n\n<li>In the <code>Redirect to<\/code> field, enter the URL you want the redirection to go to. You must enter http:\/\/ or https:\/\/ at the beginning, in this example we enter https:\/\/my-redirect-target.com.<\/li>\n\n\n\n<li>Under <code>www. redirection<\/code>, select whether you want the redirection to redirect with www, only without www or both with and without.<\/li>\n\n\n\n<li>Finally, you can tick whether or not you want to redirect with wildcards. This means that if you go to the address oderland-demo.se\/test, for example, you will be redirected to my-redirect-target.com\/test. This means that if you redirect with wildcards, you will be redirected to the same subpage on the receiving domain.<\/li>\n\n\n\n<li>Click <code>Add<\/code> when you&#8217;re done.<\/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-alert\">The redirection rules are added to the <code>.htaccess<\/code> file located in the root of the domain you choose to redirect from. If there is already code in the <code>.htaccess<\/code> file, the redirect code will be added at the end of the file. Therefore, if the redirect does not work for you, you may need to manually edit the <code>.htaccess<\/code> file and move the redirect code to the top. You can use <a href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-use-the-file-manager-in-cpanel\/\" target=\"_blank\" rel=\"noreferrer noopener\">cPanel&#8217;s File Manager<\/a> to edit the file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To create a redirect you need to log on to cPanel, we have a guide here that shows you how to do that. Then follow the steps below to create a redirect.<\/p>\n","protected":false},"author":12,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"ht-kb-category":[198],"ht-kb-tag":[],"class_list":["post-22609","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-domains-and-dns"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/22609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/comments?post=22609"}],"version-history":[{"count":4,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/22609\/revisions"}],"predecessor-version":[{"id":24021,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/22609\/revisions\/24021"}],"wp:attachment":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/media?parent=22609"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb-category?post=22609"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=22609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}