Apr 15, 2021
How to Redirect a Domain: A Complete Guide for Beginners
Let’s say you want to switch to a new domain because it represents your business better. You need to know how to redirect your domain properly. In this article, we’ll learn what a URL redirect is, how to forward your URL, and when you should do it.
What is a URL Redirect?
When you redirect a URL, you’re simply forwarding it to another address on the same, or different domain. You can set up a redirect that sends visitors to your new domain name when they’ll try to access a URL that belonged to your old domain.
How to Redirect a Domain?
The easiest way to redirect a URL is by using your hosting provider’s control panel. For this tutorial, we’ll be using the hPanel:
- Go to the hPanel. Under the Domain category, choose the Redirects menu.
- You’ll see the Create a Redirect section. Here, you’ll need to fill in which URL you want to Redirect and where you want it to Redirect To. Make sure your information is correct and to choose the right connection protocol – HTTP or HTTPS.
- Click Create once you’re done. Check the List of Redirects to ensure the information is correct.
- Once redirected, you’ll see the target URL (www.google.com) when accessing the original URL (www.hostinger-dev-6.xyz). You might need to wait a few minutes for the new redirect to go live.
You should be able to follow these steps on almost any cPanel, as the process is very similar.
Take note that the redirect above uses the 301 redirect type, as stated on the hPanel. What does that mean? Let’s learn more about domain redirect types.
What Are Domain Redirect Types?
Depending on its duration and state, there are a few types of domain redirects:
301 Redirect – Unmasked
A 301 redirect is a permanent redirect. It is used when you don’t intend to use the original URL anymore. The redirect is also unmasked, meaning your visitors will see the URL change in their browsers.
This redirect is good for SEO since you can keep the search ranking of the old domain. 301 redirects tell the search engine that the two domains are for the same website, but operations are moved to a new domain.
302 Redirect – Unmasked
302 redirects are temporary. They are also unmasked so your visitors will notice the URL change.
You can use this redirect when your website is under heavy maintenance. In other situations, you can implement a 302 redirect when performing A/B testing.
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 while, in fact, they’re viewing another URL.
Not only that, as its name suggests, the URL frame doesn’t redirect to a specific webpage but displays a frame from it.
Hiding the original domain is often used by someone who uses a free hosting service. Free hosting requires you to use a subdomain unless you upgrade to a premium plan.
However, if you use a paid hosting service and care about SEO, you should avoid this method. The same content found on two separate URLs causes duplicate content. Search engines will pick one URL over the other that might not be your preference.
It’s worth mentioning that not all hosting providers allow this type of redirect. So, if you ever run into any issues when applying a URL frame redirect, contact your support for more information.
A meta refresh is quite different from the other three types since it happens on the client-side – the browser itself.
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.hostinger-dev-6.xyz/“ />
Although a meta refresh can be effective for displaying ads while the countdown timer is running, it’s typically frowned upon. First, it risks your site’s credibility because visitors might assume that it has a security issue. Plus, it can negatively impact SEO, if the search engines consider the redirect as mere spam. This may result in your website or page getting deindexed.
Why Do I Need to Redirect My Website?
There are plenty of situations where redirecting a domain or URL can be useful. The most common reasons are:
- Having duplicate content. Multiple posts that contain the same content can negatively impact SEO. Search engines can’t decide which URL is the correct one and which one to rank on the SERP.
- Managing multiple domains. Instead of using multiple domains to display the same page, you can instead redirect them to the main one.
- Migrating to a new domain. Again, you can permanently redirect an old domain to a new one by using a 301 redirect type. This carries over Google PageRank and other SEO factors like page authority.
- Changing a post’s URL. You can avoid the 404 error by redirecting any deleted page URLs to a new one.
A URL redirect is a common practice which isn’t hard to do. Simply specify your old URL and forward it to a new one. However, you must do some research and decide which type of redirect is best for your situation. This way you’ll avoid negatively impacting SEO and credibility.
Let’s recap the four most common redirect types:
- 301 redirect is a permanent redirect that shows the new URL and carries over Google PageRank.
- 302 redirects are temporary and display the new URL.
- URL frames are redirects that display a frame from the website you’re redirecting to.
- Meta refresh is a redirect that happens in the browser. It shows a specific message and a countdown timer before redirecting to a different page.
Redirecting URLs is great for avoiding issues caused by duplicate content, when using multiple domains, switching to a new domain, and when trying to prevent 404 error pages.