How to Redirect To Another Domain Without Losing Search Engine Ranking

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.

Also known as domain forwarding, URL redirects help direct visitors to the correct website. It can also maintain search engine optimization (SEO), preventing duplicate content, and changes to site structure without impacting rankings.

We will guide you through the steps of setting up a URL redirect through your hosting provider and domain registrar settings, as well as using DNS and .htaccess files. You’ll also learn how to test and troubleshoot URL redirects using various redirect types.

A URL redirect points one URL to another. This method helps website owners direct visitors to the correct destination, even if they enter a different domain or URL. For example, if a user types googl.com, Google redirects them to google.com to ensure users reach the right site.

Prerequisites for Domain Redirection

You must meet the following requirements to set up a URL redirect:

  • Access to domain settings ‒ you should be able to use the URL redirect tool and manage DNS settings in your hosting provider or domain registrar’s account.
  • Website backup ‒ back up your website’s content and settings to prevent data loss.
  • Email forwarding ‒ 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.
  • FTP or SSH access ‒ you need access to your website’s server configuration files to set up URL forwarding using the .htaccess file.

4 Ways to Redirect a Domain Name

This section will cover four domain redirection methods, starting with the easiest. Feel free to choose the one that works best for you.

From the Web Hosting Account

Most hosting providers allow users to set up redirects through domain settings. Here’s how to redirect a domain through Hostinger‘s hPanel:

  1. Navigate to the Websites page and click on the Manage button next to the website you want to redirect.
  1. Access Domains Redirects on the left sidebar.
  2. Fill in the required information:
    • Redirect – choose a domain you want to redirect.
    • /path – if needed, specify a custom path to redirect.
    • Redirect to URL or IP – pick your preferred type of destination.
    • Redirect to – enter the destination for the domain redirect.
  1. Hit Create once you’re done.
Hostinger web hosting banner

From the Domain Registrar Account

If you don’t have a hosting plan, Hostinger provides a forwarding feature for domain-only accounts. Like domain redirection, domain forwarding automatically redirects traffic from one domain to another.

Here’s how to set up domain forwarding from a Hostinger domain registrar account:

  1. On hPanel, go to the Domains page and select Manage next to the domain you want to redirect.
  1. In the Domain Overview section, scroll down and select Forward your domain to an existing website.
  1. Enter the destination URL within the Forwarding tab.
  2. Hostinger defaults to 302 Temporary Redirect. Click Advanced options and choose Permanent (301) to configure a permanent redirect.
  1. Hit Create once you’re done.

Using DNS Records

The domain name system (DNS) 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.

To redirect domains with DNS records, create CNAME or A records linking the old domain to the new destination’s domain or IP address.

Here’s how to do it using a Hostinger account:

  1. On hPanel, navigate to the Websites page and click on the Manage button next to the website you want to redirect.
  2. Access Advanced DNS Zone Editor on the left sidebar.
  3. Fill in the new DNS record in the Manage DNS records section:
  • Type ‒ pick CNAME from the drop-down menu.
  • Name (host) ‒ enter @, which represents your old domain name.
  • Points to ‒ add the destination web address.
  • TTL ‒ keep the default TTL value at 14400 seconds.
  1. Select Add Record to save the settings.
  2. Scroll down to the list of DNS records and Remove any conflicting records set for the same @ host.

DNS propagation takes up to 24 hours to complete. Once it’s done, the old domain will redirect visitors to the new web address.

Modifying the .htaccess File

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’s URL structure.

You can use a File Manager or FTP client to locate and modify the .htaccess file. In the following steps, we’ll explain how to do it hassle-free with Hostinger’s File Manager:

  1. Head to Files File Manager from hPanel.
  2. Access files of the website linked to the domain you want to redirect.
  1. Enter the public_html directory and double-click the .htaccess file to modify it.
  1. Add the following redirect rules below the RewriteEngine On line to set up a 301 Permanent Redirect: 
RewriteCond %{HTTP_HOST} ^mydomain.com [NC,OR]

RewriteRule ^(.*)$ https://targetdomain.com/$1 [L,R=301,NC]

Remember to replace mydomain.com and targetdomain.com with the correct web addresses.

To configure 302 Temporary Redirect, replace the R’s value with 302 instead.

  1. Hit Save once you’re done.

Testing and Troubleshooting Domain Redirects

After redirecting your domain, make sure it works properly by entering your old web address into different browsers and devices and checking whether it takes you to the new URL. 

We also recommend testing your domain redirect with a redirect checker. You can look one up on search engines, such as Redirect Checker and Sitechecker, as most of them are free.

If the domain redirect doesn’t work, try the following troubleshooting tips:

  • Check the redirect type ‒ 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.
  • Clear browser cache ‒ ensure you’re seeing the website’s latest version.
  • Check DNS records ‒ if you changed your DNS record, make sure it has fully propagated using the DNS Checker.
  • Look for typos and incorrect settings ‒ check whether the redirected URL matches the target URL.

If the error persists, contact your hosting provider or domain registrar for assistance. Hostinger’s Customer Success team is available 24/7 to assist you with any redirection issues.

Types of Domain Redirects

Domain redirect types vary based on duration and state, and they can impact your SEO score. Let’s explore each type to determine the best one for your needs.

301 Redirect

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’s search ranking. This redirect type is also unmasked, meaning visitors will see the URL change in their browsers.

302 Redirect

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’t pass on SEO value to the target URL, visitors will still see the URL change in their browsers.

Masked Redirect

A masked redirect or URL frame shows the destination content while retaining the original URL in the browser’s address bar. This redirection type creates the illusion that the content is on the original domain when it’s actually elsewhere.

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’s SEO authority.

For these reasons, not all hosting providers and domain registrars support masked redirects. That said, you can edit the .htaccess file to set up a masked redirect manually.

Conclusion

Redirecting a domain or URL is a common practice to maintain user experience and SEO during website migration, rebranding, or restructuring. There are four ways to redirect one domain to another:

  • Use the hosting provider’s domain redirect tool.
  • Use the domain registrar’s forwarding feature.
  • Modify the DNS records.
  • Add redirection rules to the .htaccess file.

Choose the correct redirect type for your needs to achieve the best results for your website.

We hope this article helped you understand how to set up domain redirects without losing search engine rankings. If you have any questions, check out the FAQ section or leave a comment below.

How to Redirect a Domain FAQ

This section covers some of the most common questions about domain redirection.

Why Would I Need to Redirect a Domain?

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.

Can I Redirect Multiple Domains to the Same Website?

Yes, you can redirect multiple domain names to the same website. You can also redirect each one to a specific page on the destination domain.

Is There Any Impact on SEO When Redirecting a Domain?

When done correctly, redirects preserve SEO authority by consolidating link value and preventing duplicate content. However, incorrect redirects can lead to 404 errors or redirect chains, which occur when there’s more than one redirect between the original URL and the destination page.

Author
The author

Jordana Alexandrea

Jordana is a Senior Content Writer at Hostinger with a background in Information Systems. She has over five years of experience in WordPress and is casually dabbling with PHP and MySQL. Her passion for writing and technology drives her to create tutorials for anyone wanting to build their online presence. Follow her on LinkedIn.

Author
The Co-author

Domantas G.

Domantas leads the content and SEO teams forward with fresh ideas and out of the box approaches. Armed with extensive SEO and marketing knowledge, he aims to spread the word of Hostinger to every corner of the world. During his free time, Domantas likes to hone his web development skills and travel to exotic places.