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.
What Is a URL Redirect?
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.
Redirect | Intended Domain | Opened Page | Shown URL | Impact on SEO |
301 (unmasked) | x.com | movingx.com | movingx.com | Crawlers will index movingx.com while keeping the x.com’s Google PageRank. |
302 (unmasked) | x.com | movingx.com | movingx.com | Crawlers will index x.com |
URL Frame (masked) | x.com | movingx.com | x.com | Content duplication. Not recommended for SEO. |
Meta Refresh | x.com | A redirecting countdown timer page before landing on movingx.com. | movingx.com | Can 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:
- Navigate to the Hosting menu.
- Click the Manage button on the website you want to redirect.
- Search Redirect on the left sidebar, then click on it.
- 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.
- 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:
Pro Tip
If you use a non-www URL, redirect it to a www URL to help improve your website perfomance.
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.
Learn More About Website Maintenance
Website Maintenance Cost
Hotlinking: What Is It and Why Is It Bad?
Website Uptime and Downtime
How to Clear Browser Cache and History
How to Diagnose and Fix a Hacked Website
Best WordPress Redirect Plugin Options
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.
Comments
April 24 2017
Hello! Is the hostinger redirect is a 301 type? Thank you!
April 25 2017
Hello, Yep, that's correct. Of couse, you can use 302 redirect if you wish.
April 29 2020
Has the menu system changed? I don't see this menu.
April 30 2020
Hey, Stuart, in order to find this menu, go to your hPanel -> press Manage on the domain where you will be adding Redirects -> Scroll down a bit and you will find the Redirects option.
May 23 2021
Experiencing the same problem as Stuart, I can't see this menu at the end of the "Domain Overview" page or anywhere else
May 27 2021
Hi Alex, To find the menu, go to your hPanel -> press Manage (on the domain where you will be adding Redirects) -> Scroll down a bit and you will find the Redirects option.
July 28 2021
Where would I look to see if a meta refresh is set up? I've checked the site's header code and also the header.php file but I am stumped. The issue is that I have a domain redirected but I can't find where it's redirect is set up. Checked domain DNS (not set up), checked add on domain and cPanel redirects (also not setup), checked .htacess and index.php (not there) so now I am trying to see if a meta refresh is set up but I can't find that either. It seems possible though as it takes at least 4 seconds to wait for the redirect to happen. Thanks for any help
September 17 2021
Hi Tess, for meta refresh, check the section of your page using Inspect Tool. Additionally, make sure to look through parked domains section on your control panel and the database of your website to see if you can find the redirect. Good luck!
August 19 2021
When you redirect via your cpanel, does the old site have to remain active for a period of time until this redirect propagates to the internet, or does it happen immediately where you can take the old site down right away??
September 20 2021
Hi Dave! If you set the redirect well, the redirection from control panel should be immediate. However, if the old website goes down (e.g. domain expires, it's removed from a hosting plan, etc.), the redirect will disappear. This doesn't mean that you cannot remove the old website's files and associated data, you can surely do that as they're not reflected online anymore - just make sure to keep the domain name alive and added to your hosting plan :)
June 17 2022
How can I use redirect websites to get backlinks?
July 14 2022
Hey! If you wish to redirect website while maintaining the backlinks, you would need to use 301 redirect 😊
June 25 2022
I want to use url frame redirection option how to do that
July 01 2022
If you wish for your website's content to be reflected on another domain without creating a redirect from one domain to another, you can simply park the domain. You can learn how to do it here! 😊
June 11 2023
i've redirected my domain using the 301 redirect in the panel and when i access the root of the domain, it correctly bounces to the new url. but if i click on a previously indexed page from google, it gives a 404 instead of redirecting to the new domain. how do you fix it so that ALL URLs from the old domain are sent to the new domain? thanks!
September 02 2023
Hello. I'm trying to redirect not only the main domain but also all the pages under that domain. I tried using a path of "/*" to catch everything but it does not work. What can I use to establish a wildcard redirect?
September 08 2023
Hello there. I would highly suggest trying to set up the redirects via Cloudflare using their bulk redirects feature.
October 23 2023
I have several domains with you. Two domains have hosting packages and the third doesn't. One of my hosting packages allows subdomains. I set one up and uploaded a website to it. The subdomain site displays correctly. I've redirected the domain (the one without a hosting package) to the subdomain. Everything works great except I can't mask the redirected URL. When I set the redirect my only type options were 301 and 302. I need the URL FRAME type to mask the transfer URL. Remember there is no hosting attached to the domain so I can't mask with HTML code. So how do I mask the domain?
November 07 2023
Hi there! I apologize URL masking without hosting is not available in Hostinger. If you want to mask the URL, one possible solution is to consider purchasing a hosting package for the domain that you want to redirect. This will allow you to set up the necessary configurations and use HTML code to mask the URL 😉