{"id":519,"date":"2016-03-25T00:00:00","date_gmt":"2016-03-25T00:00:00","guid":{"rendered":"http:\/\/blog.hostinger.io\/hostinger-tutorials\/%category\/cpaneladding-a-redirect-for-your-website\/"},"modified":"2025-12-22T15:00:59","modified_gmt":"2025-12-22T15:00:59","slug":"how-to-redirect-a-domain","status":"publish","type":"post","link":"\/tutorials\/how-to-redirect-a-domain","title":{"rendered":"How to redirect a domain without losing SEO rankings"},"content":{"rendered":"<p>A URL redirect is a server function that sends users from one URL to another, typically using HTTP status codes like 301 or 302 redirects.<\/p><p>Also known as domain forwarding, a simple URL redirect helps direct visitors to the correct website. This helps prevent duplicate content, allowing you to change your site&rsquo;s structure without impacting rankings.<\/p><p>Domain redirection is a straightforward process:<\/p><ol class=\"wp-block-list\">\n<li>Log in to your domain registrar or hosting provider&rsquo;s control panel.<\/li>\n\n\n\n<li>Locate the domain forwarding or URL redirect settings.<\/li>\n\n\n\n<li>Choose the domain you want to redirect.<\/li>\n\n\n\n<li>Enter the destination URL.<\/li>\n\n\n\n<li>Select the redirect type: <strong>301 (permanent)<\/strong> or <strong>302 (temporary)<\/strong>.<\/li>\n\n\n\n<li>Save the changes and wait for propagation.<\/li>\n<\/ol><p>When done correctly, a URL redirect can boost search engine optimization (SEO) by passing link authority from old pages to new ones. This helps maintain rankings and prevents broken links, which helps improve user experience.<\/p><p>The result? Little to no traffic loss during migration.<\/p><figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Build-WordPress-Website-in-9%20Steps.pdf\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"2048\" height=\"566\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook_-Build-website-in-9-steps_in-text-banner-1.png\/public\" alt=\"\" class=\"wp-image-69276\" style=\"width:840px;height:auto\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook_-Build-website-in-9-steps_in-text-banner-1.png\/w=2048,fit=scale-down 2048w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook_-Build-website-in-9-steps_in-text-banner-1.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook_-Build-website-in-9-steps_in-text-banner-1.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook_-Build-website-in-9-steps_in-text-banner-1.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/eBook_-Build-website-in-9-steps_in-text-banner-1.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><\/a><\/figure><p>\n\n\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-prerequisites-for-domain-redirection\">Prerequisites for domain redirection<\/h2><p>To set up a URL redirect, you must meet the following requirements:<\/p><ul class=\"wp-block-list\">\n<li><strong>Access to domain settings<\/strong>. You should be able to use the URL redirect tool and manage DNS settings in your hosting provider or domain registrar&rsquo;s account.<\/li>\n\n\n\n<li><strong>Website backup<\/strong>. Back up your website&rsquo;s content and settings to prevent data loss.<\/li>\n\n\n\n<li><a href=\"\/tutorials\/email\/how-to-forward-your-emails\"><strong>Email forwarding<\/strong><\/a>. If your email is linked to the domain and you plan to redirect your web address, set up email forwarding to receive emails on the new domain.<\/li>\n\n\n\n<li><strong>FTP or SSH access<\/strong>. You need access to your website&rsquo;s server configuration files to set up URL forwarding using the <strong>.htaccess<\/strong> file.<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"h-4-ways-to-redirect-a-domain-name\">4 ways to redirect a domain name<\/h2><p>This section will cover four domain redirection methods, starting with the most flexible. Choose the one that best suits your needs.<\/p><h3 class=\"wp-block-heading\" id=\"h-modifying-the-htaccess-file\">Modifying the .htaccess file<\/h3><p>This method works best for configuring advanced redirects. It lets you implement complex redirect rules and manage multiple redirects, giving you more control over your website&rsquo;s URL structure. <\/p><p>The real advantage of using the <strong>.htaccess<\/strong> file is its flexibility. It lets you manage redirects based on specific conditions, like certain URL patterns or user agents, making it ideal for complex needs.<\/p><p>You can use a File Manager or FTP client to <a href=\"\/tutorials\/locate-and-create-htaccess\">locate and modify the .htaccess file<\/a>. In the following steps, we&rsquo;ll explain how to do it hassle-free with <a href=\"\/tutorials\/how-to-use-hostinger-file-manager\/\">Hostinger&rsquo;s File Manager<\/a>:<\/p><ol class=\"wp-block-list\">\n<li>Open the <strong>File manager<\/strong> in your hPanel dashboard.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69df6463401dd\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/03\/hpanel-dashboard-1024x525.png\" alt=\"hPanel dashboard, highlighting the File manager menu\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\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\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"2\" class=\"wp-block-list\">\n<li>Enter the <strong>public_html<\/strong> directory and double-click the <strong>.htaccess<\/strong> file to modify it.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69df646340599\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/03\/file-manager-public-html-1024x402.png\" alt=\"Hostinger's File manager interface, highlighting the .htaccess file\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\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\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>Add the following redirect rules below the <strong>RewriteEngine On<\/strong> line to set up a 301 Permanent Redirect:<\/li>\n<\/ol><pre class=\"wp-block-preformatted\">RewriteCond %{HTTP_HOST} ^mydomain.com [NC,OR]<br><br>RewriteCond %{HTTP_HOST} ^www\\.mydomain\\.com$ [NC]<br><br>RewriteRule ^(.*)$ https:\/\/targetdomain.com\/$1 [L,R=301,NC]<\/pre><p>Remember to replace <strong>mydomain.com<\/strong> and <strong>targetdomain.com<\/strong> with the correct web addresses.<\/p><p>To configure 302 Temporary Redirect, replace the <strong>R<\/strong>&rsquo;s value with <strong>302<\/strong> instead.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69df6463408f5\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/03\/htaccess.png\" alt=\".htaccess file, highlighting redirect rules\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\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\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>Hit <strong>Save<\/strong> once you&rsquo;re done.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-from-the-web-hosting-account\">From the web hosting account<\/h3><p>Most hosting providers allow users to set up redirects through domain settings, making this method the easiest and most user-friendly option. Here&rsquo;s how to redirect a domain through Hostinger&lsquo;s <a href=\"https:\/\/www.hostinger.com\/support\/1583483-comprehensive-guide-to-hpanel-at-hostinger\/\">hPanel<\/a>:<\/p><ol class=\"wp-block-list\">\n<li>Head to <strong>Domains<\/strong> &rarr; <strong>Redirects<\/strong> on the left sidebar of your hPanel dashboard.<\/li>\n\n\n\n<li>Fill in the required information:<\/li>\n<\/ol><ul class=\"wp-block-list\">\n<li><strong>Redirect<\/strong>: choose a domain you want to redirect.<\/li>\n\n\n\n<li><strong>\/path<\/strong>: if needed, specify a custom path to redirect.<\/li>\n\n\n\n<li><strong>Redirect to URL or IP:<\/strong> pick your preferred type of destination.<\/li>\n\n\n\n<li><strong>Redirect to<\/strong>: enter the destination for the domain redirect.<\/li>\n<\/ul><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69df646340cdc\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/03\/hpanel-redirects-1024x462.png\" alt=\"Domain redirection menu in hPanel\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\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\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>Hit <strong>Create <\/strong>once you&rsquo;re done.<\/li>\n<\/ol><figure class=\"wp-block-image size-full\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-web-hosting\" href=\"\/web-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\/public\" alt=\"Hostinger web hosting banner\" class=\"wp-image-98604\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/11\/Web-hosting_in-text-banner.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h3 class=\"wp-block-heading\" id=\"h-from-the-domain-registrar-account\">From the domain registrar account<\/h3><p>If you don&rsquo;t have a hosting plan, you can still redirect your domain using Hostinger&rsquo;s domain forwarding feature. While technically a form of forwarding, it functions like a redirect by sending visitors from your domain to another website.<\/p><p>Here&rsquo;s how:&nbsp;<\/p><ol class=\"wp-block-list\">\n<li>On hPanel, go to <strong>Domains<\/strong> &rarr; <strong>Domain portfolio<\/strong> and select <strong>Manage<\/strong> next to the domain you want to redirect.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69df64634271d\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/03\/hpanel-domains-1024x535.png\" alt=\"Domain portfolio section in hPanel\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\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\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"2\" class=\"wp-block-list\">\n<li>In the <strong>Domain Overview<\/strong> section, scroll down and select <strong>Redirect your domain<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69df6463429a3\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/03\/hpanel-domain-overview.png\" alt=\"The Tools section within hPanel's Domain Overview page\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\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\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"3\" class=\"wp-block-list\">\n<li>Set the redirect form to <strong>Custom<\/strong>, enter the destination URL, and select the redirect type.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69df646342c1f\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/03\/hpanel-domain-overview-forwarding-1024x485.png\" alt=\"Domain forwarding section in hPanel, redirecting a domain not linked to any website\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\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\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>Hit <strong>Create redirect<\/strong> once you&rsquo;re done.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-using-dns-records\">Using DNS records<\/h3><p>The <a href=\"\/tutorials\/what-is-dns\">domain name system (DNS)<\/a> translates domain names into IP addresses. When a user enters a domain name into their browser, the DNS system finds the matching IP address for that domain and directs the user to that website.<\/p><p>To redirect domains with DNS records, create <strong>CNAME <\/strong>or <strong>A <\/strong>records linking the old domain to the new destination&rsquo;s domain or IP address.<\/p><p>Here&rsquo;s how to do it using a Hostinger account:<\/p><ol class=\"wp-block-list\">\n<li>Access <strong>Advanced <\/strong>&rarr; <strong>DNS Zone Editor <\/strong>on the left sidebar of the hPanel dashboard.<\/li>\n\n\n\n<li>Fill in the new DNS record in the Manage DNS records section:<\/li>\n<\/ol><ul class=\"wp-block-list\">\n<li><strong>Type: <\/strong>pick <strong>CNAME <\/strong>from the drop-down menu.<\/li>\n\n\n\n<li><strong>Name (host): <\/strong>enter <strong>@<\/strong>, which represents your old domain name.<\/li>\n\n\n\n<li><strong>Points to<\/strong>: add the destination web address.<\/li>\n\n\n\n<li><strong>TTL<\/strong>: keep the default TTL value at 14400 seconds.<\/li>\n<\/ul><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69df6463444ef\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1419\" height=\"472\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/05\/hpanel-dns-zone-editor.png\/public\" alt=\"DNS Zone Editor in hPanel\" class=\"wp-image-110009\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/05\/hpanel-dns-zone-editor.png\/w=1419,fit=scale-down 1419w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/05\/hpanel-dns-zone-editor.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/05\/hpanel-dns-zone-editor.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/05\/hpanel-dns-zone-editor.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/05\/hpanel-dns-zone-editor.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1419px) 100vw, 1419px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\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\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>Select<strong> Add Record<\/strong> to save the settings.<\/li>\n\n\n\n<li>Scroll down to the list of DNS records and <strong>Remove <\/strong>any conflicting records set for the same <strong>@<\/strong> host.<\/li>\n<\/ol><p>DNS propagation takes <strong>up to 24 hours<\/strong> to complete. Once it&rsquo;s done, the old domain will redirect visitors to the new web address. You can monitor your propagation status by location for domains using Hostinger nameservers. <\/p><h2 class=\"wp-block-heading\" id=\"h-testing-and-troubleshooting-domain-redirects\">Testing and troubleshooting domain redirects<\/h2><p>After setting up the redirect, test it by entering your old domain in different browsers and devices to make sure it leads to the correct URL. You can also use free online tools like What&rsquo;s My DNS or WhereGoes to verify it&rsquo;s working properly.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69df646344a75\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/03\/redirect-checker-1024x352.png\" alt=\"Redirect checker by What's My DNS\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\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\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>If the domain redirect doesn&rsquo;t work, try the following troubleshooting tips:<\/p><ul class=\"wp-block-list\">\n<li><strong>Check the redirect type<\/strong>. Clarify whether the redirect is intended to be permanent (301) or temporary (302). If you use the wrong redirect type, delete the old one and create a new redirect by following the steps above. Check the next section to learn the difference between the two types of redirects.<\/li>\n\n\n\n<li><a href=\"\/tutorials\/clear-browser-cache\">Clear browser cache<\/a>. Make sure you&rsquo;re seeing the website&rsquo;s latest version.<\/li>\n\n\n\n<li><strong>Check DNS records<\/strong>. If you changed your DNS record, make sure it has fully propagated using a DNS checker.<\/li>\n\n\n\n<li><strong>Look for typos and incorrect settings<\/strong>. Check whether the redirected URL matches the target URL.<\/li>\n<\/ul><p>If the error persists, contact your hosting provider or domain registrar for assistance. Hostinger&rsquo;s Customer Success team is available 24\/7 to assist you with any redirection issues.<\/p><h2 class=\"wp-block-heading\" id=\"h-types-of-domain-redirects\">Types of domain redirects<\/h2><p>There are two main types of redirects: 301 (permanent) and 302 (temporary). Not every situation benefits from a 301 redirect domain setup, so it&rsquo;s important to understand which type to use to protect your SEO performance.<\/p><h3 class=\"wp-block-heading\" id=\"h-301-redirect\">301 redirect<\/h3><p>Also known as a permanent redirect, 301 redirect is commonly used when moving a website to a new domain. It passes on link equity and maintains links coming from other websites, allowing you to retain the old domain&rsquo;s search ranking. This redirect type is also unmasked, meaning visitors will see the URL change in their browsers.<\/p><p>Want to set up <a href=\"\/tutorials\/301-redirects-in-wordpress\">301 redirects in WordPress<\/a>? Check out our step-by-step guide covering all the available methods.<\/p><h3 class=\"wp-block-heading\" id=\"h-302-redirect\">302 redirect<\/h3><p>A 302 redirect is a temporary redirection method often used in the short term for purposes like heavy website maintenance or A\/B testing. Although it won&rsquo;t pass on SEO value to the target URL, visitors will still see the URL change in their browsers.<\/p><h3 class=\"wp-block-heading\" id=\"h-masked-redirect\">Masked redirect<\/h3><p>A masked redirect or URL frame shows the destination content while retaining the original URL in the browser&rsquo;s address bar. This redirection type creates the illusion that the content is on the original domain when it&rsquo;s actually elsewhere.<\/p><p>Although many marketers use masked redirects for affiliate marketing or branding purposes, they can negatively impact SEO in the long run. Search engines might identify them as duplicate content, which can harm the destination domain&rsquo;s SEO authority.<\/p><p>For these reasons, not all hosting providers and domain registrars support masked redirects. That said, you can edit the <strong>.htaccess<\/strong> file to <a href=\"https:\/\/ultahost.com\/knowledge-base\/url-masking-using-htaccess\/\" target=\"_blank\" rel=\"noopener\">set up a masked redirect manually<\/a>. <\/p><h2 class=\"wp-block-heading\" id=\"h-why-would-i-need-to-redirect-a-domain\">Why would I need to redirect a domain?<\/h2><p>Redirecting domains is a common practice during website rebranding or restructuring, domain consolidation, or protocol change. Redirects allow visitors to access the correct website, even if they enter the wrong web address or click on an outdated link. It also helps preserve SEO authority and prevent broken links.<\/p><h3 class=\"wp-block-heading\" id=\"h-can-i-redirect-multiple-domains-to-the-same-website\">Can I redirect multiple domains to the same website?<\/h3><p>You can redirect multiple domain names to the same website. It&rsquo;s also possible to redirect each one to a specific page on the destination domain.<\/p><h2 class=\"wp-block-heading\" id=\"h-do-redirects-hurt-seo\">Do redirects hurt SEO?<\/h2><p>When done correctly, redirects don&rsquo;t hurt your search engine optimization (SEO) efforts. In fact, 301 redirects pass most of a page&rsquo;s link equity to the new URL, making them essential for maintaining rankings when moving content, changing domains, or fixing broken links.<\/p><p>When it comes to SEO and redirects, problems usually happen only if they&rsquo;re excessive or set up incorrectly. Too many redirects can slow your site and confuse search engines, which may harm SEO. The key is to use them sparingly, point to the most relevant pages, and include them in your regular <a href=\"\/tutorials\/seo-audit\">SEO audit process<\/a> to keep everything running smoothly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A URL redirect is a server function that sends users from one URL to another, typically using HTTP status codes [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/tutorials\/how-to-redirect-a-domain\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to redirect a domain without losing SEO rankings","rank_math_description":"Four effective ways to redirect a domain without losing rankings: 1. Modifying the .htaccess file, 2. From a web hosting account + more.","rank_math_focus_keyword":"how to redirect a domain","footnotes":""},"categories":[22635,22631],"tags":[],"class_list":["post-519","post","type-post","status-publish","format-standard","hentry","category-configuration-and-management","category-domains"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-redirect-a-domain","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/redirection","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/como-redireccionar-una-url-a-otra","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/cara-membuat-redirect-url-di-website-anda","default":0},{"locale":"de-DE","link":"https:\/\/www.hostinger.com\/de\/tutorials\/domain-umleiten","default":0},{"locale":"it-IT","link":"https:\/\/www.hostinger.com\/it\/tutorial\/come-reindirizzare-un-dominio","default":0},{"locale":"pl-PL","link":"https:\/\/www.hostinger.com\/pl\/tutoriale\/jak-przekierowac-domene","default":0},{"locale":"ja-JP","link":"https:\/\/www.hostinger.com\/jp\/tutorials\/how-to-redirect-a-domain","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-redirect-a-domain","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-redirect-a-domain","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-redirect-a-domain","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/como-redireccionar-una-url-a-otra","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/como-redireccionar-una-url-a-otra","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/como-redireccionar-una-url-a-otra","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-redirect-a-domain","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-redirect-a-domain","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-redirect-a-domain","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-redirect-a-domain","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/comments?post=519"}],"version-history":[{"count":50,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/519\/revisions"}],"predecessor-version":[{"id":138329,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/519\/revisions\/138329"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media?parent=519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/categories?post=519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/tags?post=519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}