How to Redirect a Domain and Understand Redirect Types

As you develop a website, you might need to switch to a new domain or perform A/B testing. In these cases, you will have to set up a URL redirect to keep your website running.

However, you should choose a redirect type carefully, as it can impact your site’s search engine optimization (SEO) performance.

With this in mind, we’ll go over how to redirect a domain and the domain redirect types.

A URL redirect points one URL to another. Setting up a URL redirect lets visitors access a different domain than they typed. For example, Google sets up a URL redirect for end users who possibly mistype googl.com to access the right address, google.com.

What Are Domain Redirect Types?

Depending on its duration and state, there are a few types of domain redirects. It is important to know the difference between them as they impact your SEO score.

301 Redirect – Unmasked

301 Redirect is a permanent redirect type that you can use after moving your website to a new domain. It is good for SEO as you can keep the search ranking of the old domain.

This redirect type is unmasked, meaning visitors will see the URL change in their browsers.

Suggested Reading

Want to create a new link structure for your WordPress site or migrate it to a new domain? Learn the necessary steps to set up 301 redirects in WordPress.

302 Redirect – Unmasked

Unlike 301 Redirect, 302 Redirect is temporary. You can use this redirect type while undergoing heavy maintenance or A/B testing.

As 302 Redirect is also unmasked, visitors will notice the URL change.

URL Frame – Masked

Unlike the two other types, the URL frame is a masked redirect. That means your visitors will see the exact URL they typed in their browser they’re actually viewing another URL’s web content.

Moreover, a URL frame doesn’t redirect to a specific web page but displays a frame from it.

This redirect type usually happens to people signing up for a free web hosting service as it uses a subdomain. Upgrading to a premium plan can prevent this case while also giving you domain privacy protection for eligible TLDs.

We don’t recommend URL frame redirection If you use a paid hosting service.

The same content found on two separate URLs causes duplicate content, so search engines may pick one URL over the other that you don’t want to be indexed.

For that reason, not all hosting providers allow a URL frame. So, if you ever run into any issues when applying a URL frame redirect, contact your hosting customer support team for more information.

Meta Refresh

While the other three redirect types happen on the server side, meta refresh works on the client side. It instructs the browser to visit a different web page in a certain timeframe.

This redirect uses a unique meta tag placed in the head section of an HTML document:

<meta http-equiv="Refresh" content=“6; url=http://www.example.com/“ />

The number six indicates the redirection time in seconds.

Meta refresh can effectively display ads as the countdown timer is running. However, it can lead to certain issues.

First, it risks your site’s credibility because visitors might assume it has a security issue.

Plus, it can negatively impact SEO if search engines consider the redirect as mere spam. This may result in your website or page getting deindexed.

To understand the redirection types better, see the table below. It shows an example of redirecting x.com to movingx.com using different redirect types.

RedirectIntended DomainOpened PageShown URLImpact on SEO
301 (unmasked)x.commovingx.commovingx.comCrawlers will index movingx.com while keeping the x.com’s Google PageRank.
302 (unmasked)x.commovingx.commovingx.comCrawlers will index x.com
URL Frame (masked)x.commovingx.comx.comContent duplication. Not recommended for SEO.
Meta Refreshx.comA redirecting countdown timer page before landing on movingx.com.movingx.comCan be considered spam. Not recommended for SEO.

How to Redirect a Domain?

The easiest way to redirect a URL is through your hosting provider’s control panel. For this tutorial, we’ll use hPanel:

  1. Navigate to the Hosting menu.
  2. Click the Manage button on the website you want to redirect.
  3. Search Redirect on the left sidebar, then click on it.
  4. 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 desired type of destination.
  • Redirect to – enter the destination to where the domain will redirect.
A domain redirect configuration page on hPanel
  1. Hit Create once you’re done.

In case you don’t have a hosting plan, Hostinger also offers redirect feature for domain-only accounts. Simply navigate to the Domains section and select your domain. From there choose the Forward domain option:

The Domains Overview page on hPanel. The forward domain option is highlighted

Pro Tip

If you use a non-www URL, redirect it to a www URL to help improve your website perfomance.

Hostinger web hosting banner

Conclusion

A URL redirect refers to pointing a certain URL address to a different one. There are four most common redirect types:

  • 301 redirect – a permanent redirect that shows the new URL and carries over Google PageRank.
  • 302 redirects – temporary redirects which also display the new URL.
  • URL frames – redirects displaying a frame from the website you’re redirecting to.
  • Meta refresh – a redirect happening in the browser which shows a specific message and a countdown timer before redirecting to a different page.

Before setting up a URL redirect on your website, research the best type for your situation and ensure you’re not creating loops that can negatively impact your site’s SEO.

How to Redirect a Domain FAQ

Why Do I Need to Redirect My Website?

There are plenty of situations where redirecting a domain or URL can be useful.
For instance, having multiple posts with the same content on your website can negatively impact SEO, so you may want to create a URL redirect to prevent that from happening. Or you are moving to a new domain name for branding purposes.

Can I Redirect a Deleted Page?

Yes. You can avoid the 404 error by redirecting any deleted page URLs to a new one.

Author
The 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.