A domain redirect, also called domain forwarding, is a way to send visitors from one website address to another. This means if someone types or clicks on your old website link but is sent to a new website without even noticing, the process is smooth and automatic. This is what a domain redirect does. It ensures people reach the right place, even using your old domain name.
Redirects are important for user experience and Search Engine Optimization (SEO). It ensures users don’t see a confusing error like “Page Not Found”. Instead, they are sent to the right page. For search engines like Google, redirects help keep your website ranking high. If you move your website to a new domain and don’t set up redirects, search engines might think your site is broken; this can hurt your ranking.
This guide covers everything you need to know about domain redirects. We’ll learn about different types of redirects, like 301 (permanent), 302 (temporary), and masked redirects, and when to use each of them.
We’ll also discuss the prerequisites for domain redirection, leading to the 4 ways to redirect a domain to another domain. Lastly, we show you how to test and troubleshoot redirects, avoid common mistakes while redirecting, and explore some best practices that must be considered.
Table of Contents
Types of Redirects
There are different types of redirects, and each has a specific purpose. Let’s break them down:
301 Permanent Redirect
A 301 redirect moves a page or website to a new address permanently. It tells browsers and search engines that the move is permanent. For example, if you change your domain name from oldsite.com to newsite.com, you’d use a 301 redirect so all traffic automatically goes to the new site.
This type of redirect is great for SEO because search engines transfer most of the ranking power from the old URL to the new one. This means your new website can keep the good ranking of your old one. It also ensures that anyone who bookmarked your old website will still land on the correct page.
302 Temporary Redirect
A 302 redirect is used when the move is only temporary. For example, you might use a 302 redirect if you’re redesigning a page and want users to go to a temporary version for now.
If your website is under maintenance or is running a short-term promotion, a 302 redirect will send users to a temporary page. Once you want to return to the original site, remove the redirect.
Unlike the 301 redirects, a 302 redirect tells search engines that your original page will return soon, so they don’t transfer the SEO ranking to the temporary page. It’s important to use a 302 redirect only when you plan to return to the original page or domain.
Masked Redirect
A masked redirect (also known as a “domain masking” and “cloaked redirect”) sends users to a new page while keeping the original URL visible in the address bar. This type of redirect is often used to hide the new domain or page from users. For example, you might want visitors to think they’re on example.com although they see content from anotherwebsite.com.
While it can be useful in some situations, masked redirects are generally not recommended for SEO. Search engines can view this as a sneaky or manipulative approach, which could hurt your website’s ranking.
Let’s have a look at the following table to recap the redirection types quickly if we’re redirecting olddomain.com to newdomain.com:
Redirect Type | Visitor Goes To | Website Shown | Address Displayed in Browser | SEO Rating |
301 Permanent Redirect (Unmasked) | olddomain.com | newdomain.com | newdomain.com | newdomain.com is indexed |
302 Temporary Redirect (Unmasked) | olddomain.com | newdomain.com | newdomain.com | olddomain.com is indexed |
Masked Redirect | olddomain.com | newdomain.com | olddomain.com | Not Suitable for SEO |
Each of these redirects serves a different purpose, so ensure you choose the right one based on what you’re trying to do with your website.
When to Redirect One Domain to Another Domain
Domain redirects are often used for different reasons. Let’s review some of the most common use cases where you may need to set one up.
Move a Website to a New Domain
Sometimes, you might need to change your website’s domain. Maybe your business has rebranded, or you found a better domain name. In this case, setting up a 301 permanent redirect ensures that anyone visiting your old domain will automatically be sent to your new one. This also helps search engines like Google know that your website has moved, allowing you to keep your SEO rankings on the new domain.
Merge 2 Websites
If you have two websites with similar content and want to combine them into one, a redirect helps smooth the process. For example, if you’re merging siteA.com with siteB.com, a redirect from siteA.com to siteB.com will send all visitors from the old site to the new one without confusion. This way, you won’t lose visitors or traffic, and search engines will understand that both websites are now one.
Redirect a Non-www Version to www (or Vice-Versa)
You may have noticed that some websites use www at the beginning of their domain (like www.example.com), while others don’t (like example.com). To avoid splitting traffic between these two versions of your site, you can set up a redirect from one version to the other.
For instance, if you prefer using the www version, you can redirect all non-www traffic to the www version, ensuring everyone ends up in the same place. This is important for keeping your website’s SEO strong by not dividing it between two URLs.
Redirect an Old Domain to a New One
If you’ve stopped using an old domain, but people still try to visit, you can redirect that old domain to your current one. This is useful if your business has an older website and you want to ensure no visitors are lost. A simple redirect ensures anyone typing in the old address ends up on the correct site, improving the user experience and helping to keep your SEO intact.
These are just a few examples of when you might use a domain redirect. If you set up the right redirect for each situation, you ensure visitors and search engines always land in the right place.
Prerequisites for Domain Redirection
Before you set up a domain forwarding, there are a few things you need to have in place. These steps help smooth the process and ensure you don’t lose important data. Let’s look at what you need.
Access to Domain Settings
First, you need access to your domain settings. These are the controls provided by your domain registrar (the company where you bought your domain name). In domain settings, you can manage things like DNS records and redirects. If you don’t know where to find these settings, check your registrar’s website or the support section for guidance. Having access to these controls is essential for making changes to your domain.
Back up Your Website
It’s always smart to back up your website before making any big changes, including setting up a redirect. Backing up ensures that, if there are any problems, you can restore your website quickly without losing valuable files or data. Many hosting providers offer one-click backups, or you may use a WordPress plugin to create a backup. It’s a simple step that gives you peace of mind while working on your site.
FTP or SSH Access
Lastly, you’ll need Secure Shell (SSH) or File Transfer Protocol (FTP) access to your website’s files. This is especially important if you plan to alter files like .htaccess to redirect one domain to another.
FTP and SSH allow you to connect to your website’s server and make changes directly. If you’re unfamiliar with these tools, don’t worry—your hosting provider likely has easy-to-follow guides, and many WordPress plugins can help with redirect setup without needing FTP access.
If you’re a Hosted.com user, you may refer to the following guides to see how to connect to your site using FileZilla and WinSCP FTP clients please refer to our Knowledgebase articles below:
– How to Configure a Website in FTP Client FileZilla
– How to Configure a Website in WinSCP
By ensuring you have access to these three key things—domain settings, a website backup, and FTP or SSH access—you’re setting yourself up for a smooth and safe domain redirection process.
How to Redirect a Domain to Another Domain
This section shows you 4 methods to redirect a domain to another domain. One of the easiest methods is using your web hosting account. Let’s look at the steps using your hosting account’s built-in tools. This simple method doesn’t require coding skills, so it’s great for beginners.
Redirect Using a Web Hosting Account
Many web hosts, like those with cPanel, offer tools that make setting up a domain redirect easy. Here’s how you can redirect a domain to another domain using the Hosted.com control panel:
First, navigate to the Hosted.com login page. Provide your email and password and click Sign In.
Once logged in, you’ll see the Hosted.com Dashboard with the Manage Account menu on the left side. Your Account Information, Account Overview, and any Invoices Due and Open Support Tickets will be displayed on the right side.
Now, click Manage Services to expand the dropdown menu. Then, select the hosting package for which you want to redirect a domain to another domain. For this tutorial example, we use WordPress Hosting.
Now, click Manage next to your required domain name.
On the next screen click Login under Product Information to access the Hosted.com cPanel.
Once you’re in, go to Domains → Redirects. If you have a different hosting environment, you can look for options, such as “domain redirect”, “domain forwarding”, or “URL redirect” within the settings for the selected domain.
After you click on Redirects, you’ll be asked to choose the type of redirect. If the move is permanent, select Permanent (301). If it’s temporary, choose Temporary (302). Usually, you will use the 301 redirect since it passes the SEO benefits to the new domain.
Also, the 301 redirect informs the visitor’s browser to update its records permanently, whereas the 302 redirect doesn’t update the visitor’s bookmarks.
Next, choose the domain you want to redirect from the drop-down menu or select All Public Domains to apply the redirect to all domains under your cPanel account.
In the following text box, enter the specific part of the URL you wish to redirect visitors. For example, if you want to redirect http://yoursite.com/directory.file.html to another URL, enter directory/file.html in the box.
In the Redirects to field, you can type the full URL where you want to send users. Be sure to incorporate the protocol, such as http:// or https://.
After that, choose one of these redirection options:
- Only redirect with www.: Redirects only those visitors who include www. before the domain name.
- Redirect with or without www.: Redirects all users, regardless of whether they enter www. before the domain.
- Do Not Redirect www.: Do not redirect users who include www. before the domain name.
Important:
If you select All Public Domains, the www. options will be disabled.
In future, if you want to redirect all files in a directory to the same file path on the new domain, select the Wild Card Redirect option. For example, if yoursite1.com redirects to yoursite.com, a file at http://yoursite1.com/pic.jpg will redirect to http://yoursite.com/pic.jpg.
Remember, you can’t use Wild Card Redirect to redirect your primary domain to a different directory on your website. Now, click Add to redirect a domain to another domain.
Once you’ve saved the changes, you can test the redirect to ensure it works. Open a browser and type in your old domain. If you set up the redirect correctly, you’ll be taken to the new domain or page you entered earlier.
Redirect Through Your Domain Registrar Dashboard
Hosted.com also serves those with a domain name, not a hosting plan. This is like domain redirection; the domain pointing feature automatically sends traffic from one domain to another. Here’s how to set up domain forwarding using your Hosted.com Domain dashboard:
Login to your Hosted account. Navigate to Manage Services → Domains. Then, click Manage next to your domain name.
Next, click Manage DNS under the Domain Information section.
After that, click Domain Pointing.
Now, you’ll see a pop-up where you can enter a domain to redirect. Click Submit.
Important:
Hosted.com defaults to 302 Temporary redirects.
At Hosted.com, you can easily search for and register your Domain Name.
You can also benefit from our extended functionalities like domain pointing and URL redirection, which enable you to guide traffic to your preferred web address destination.
Redirect via DNS Records
In this section, we show you how DNS redirect to another domain. The domain name system (DNS) converts domain names into IP addresses. When a user types a domain name into their browser, DNS locates the corresponding IP address and directs the user to the website.
To redirect a domain to another domain using DNS records, you can create CNAME or A records that link the old domain to the new domain or IP address. Here’s how to do it using your Hosted.com account:
First, log in to your Hosted.com account to access the Hosted Dashboard. Then, scroll down to the Account Overview section and click View next to Manage Domains.
Now, navigate to your preferred domain, click the Manage dropdown menu next to it, and choose Manage DNS.
In the Manage DNS Records page, fill in the new record details:
Host:
This field refers to the part of your domain you’re working with. If you want to redirect your main domain (like yoursite.com), you can enter @ to represent the root domain. However, to redirect a subdomain (like blog.yoursite.com), enter blog in this field.
TTL (Time to Live):
The TTL setting controls how long servers cache the DNS record before it checks for updates. It’s usually set in seconds. The default value is typically 14400 seconds, (that’s 4 hours), and it’s fine to leave this value as is unless you need something specific.
Type:
Choose the kind of DNS record you’re creating. A record points your domain name to an IP address, whereas a CNAME record points one domain or subdomain to another domain name (good for domain redirection). If it’s for redirection, you’ll probably use CNAME to point your domain to another domain.
Priority:
This field is used mainly for MX records (which handle email), so you can skip this when setting up a redirect for web traffic. You won’t need to fill it in for CNAME or A records.
Value:
This is where you enter the destination or target for the redirection. If you set up a CNAME record, you will enter the domain you’re redirecting to. For example, if you redirect oldsite.com to newsite.com, you enter newsite.com here. However, if using an A record, you would enter the server’s IP address.
After filling in all the details, click Add to add the DNS record.
Important:
Scroll down to the DNS records list and remove any conflicting records for the same host. DNS changes can take up to 24 hours to propagate. After that, the old domain will automatically redirect visitors to the new address.
Redirect Using the .htaccess File
This method is ideal for setting up advanced redirects. It allows you to create complex redirect rules and manage multiple redirects, giving you greater control over your website’s URL structure.
You can access and modify the .htaccess file using a File Manager or an FTP client. In this tutorial example, we use the Hosted.com File Manager, which allows you to edit files directly. Here’s how you do it:
Login to the Hosted.com cPanel and navigate to Files → File Manager.
Go to your WordPress installation’s root directory, select the .htaccess file, and click Edit to open it in an editor.
Important:
Before you make any changes to redirect a domain to another domain, we recommend creating a backup of the original .htaccess file. If you do this, you can restore it quickly if anything goes wrong, without breaking your website.
Once you have the .htaccess file open, add the 301 permanent redirect rule below the RewriteEngine On line as follows:
RewriteCond %{HTTP_HOST} ^domain.com [NC,OR]
RewriteRule ^(.*)$ https://targetdomain.com/$1 [L,R=301,NC]
Don’t forget to replace your domain.com and targetdomain.com with your correct web addresses. However, if you want to configure 302 Temporary Redirect, replace the R’s value with 302 instead.
After that, click Save Changes to save your .htaccess file.
If you’ve used an FTP client to edit a .htaccess file, you must upload it back to your server. Then, visit your website to test if the redirects are working correctly. If the redirect doesn’t work as expected or if the website breaks, it’s important to check any changes you made. A single mistake in the .htaccess file can cause issues, so having a backup is helpful.
PLEASE NOTE:
Redirecting using a secure connection (HTTPS) is only possible if your destination domain is different (e.g., http://www.domain.com to https://www.newdomain.com). Ensure both domains have SSL certificates. If you need to switch between HTTP and HTTPS (HTTP → HTTPS or HTTPS → HTTP) within the same domain (http://domain.com to https://domain.com), configure it through the .htaccess file, provided an SSL certificate is installed. Redirecting from https://site1.com to https://site2.com requires both domain names to have SSL installed.
Test & Troubleshoot Redirects
Once you redirect a domain to another domain, it’s important to test if it’s working correctly. You can use tools like Redirect Checker. This tool will confirm if your redirect is active and whether it’s a 301 or 302 redirect.
If the redirect isn’t working, common issues might include incorrect DNS settings, problems in the .htaccess file, or slow DNS propagation. Double-check the settings and ensure you’ve saved the changes properly. You may also use the DNS Checker tool to ensure it has completely propagated. If any of these don’t help, try clearing your browser cache to see the latest version of your website.
Best Practices for Domain Redirection
Here are a few useful things to consider when you redirect a domain to another domain:
- Avoid Redirect Loops: A redirect loop happens when a page keeps redirecting back to itself. Use redirect checker tools to avoid this issue.
- Use Consistent Redirect Types: For a permanent move, stick to a 301 redirect to ensure proper SEO benefits.
- Test your Redirects: Type your old domain into a web browser. If you have set up the redirect correctly, the browser will take you to the new domain. Alternatively, you can also use online tools to confirm your redirects are working correctly.
- Update Internal Links: Ensure all internal links point to the new domain. This helps with SEO and keeps users away from landing on broken pages.
- Notify Google About the Change: Submit your new domain to Google Search Console to help search engines recognize your new site faster.
Common Redirect Mistakes to Avoid
When you redirect a domain to another domain, you may make a mistake that could cause problems for your website. Let’s consider some common errors and how to avoid them to keep your website running smoothly.
One common mistake is using the wrong redirect type, like choosing a 302 temporary redirect when a 301 permanent redirect is needed. This can confuse search engines and hurt SEO.
When you set up a redirect, it’s important to update your sitemap too. The sitemap helps search engines understand the structure of your website and which pages are important.
If you forget to update them, search engines may continue crawling the old URLs, leading to errors or outdated information. To avoid this, ensure you update your sitemap and submit the new version to tools like Google Search Console.
Also, if your new domain uses HTTPS, you ensure you set up an SSL certificate properly. It’s essential for securing your website and protecting user data.
If you don’t install an SSL certificate on the new domain, visitors may see a “Not Secure” alert when they try to access your site, which can scare them away. Always ensure the SSL certificate is active and working on the new domain to maintain trust and security.
By avoiding these common mistakes, you can ensure your domain redirects work properly, protect your SEO, and provide a seamless experience for visitors.
KEY TAKEAWAYS
- When you redirect a domain to another domain, you send visitors from one web address to another automatically.
- Use a 301 permanent redirect to keep your SEO ranking when moving to a new domain.
- A 302 temporary redirect is best for short-term changes without affecting SEO.
- Avoid redirect loops by testing your setup carefully.
- Update internal links and the XML sitemap after making any redirects.
- Ensure the new domain has an SSL certificate for security and trust.
- Regularly test your redirects using tools to confirm they’re working properly.
- Notify Google of your domain change through Google Search Console.
- Keep your redirect strategy simple and consistent to avoid confusion.
FAQs
Why should I set up a domain redirect?
You should set up a redirect to avoid losing visitors when you change your domain. It also helps maintain your SEO rankings by telling search engines that your site has moved.
How long does it take for a domain redirect to work?
It can take a few minutes to 24-48 hours for the redirect to fully take effect due to DNS propagation. This time allows the internet to recognize the new settings.
Can I redirect a subdomain to another domain?
Yes, you can redirect a subdomain (like blog.example.com) to a different domain or to another page on your site. This can be done using CNAME or A records in your DNS settings.
Do I need to update internal links after a redirect?
Yes, updating your internal links is good practice. While a redirect will guide visitors to the right page, updating the links ensures everything stays organized and helps search engines crawl your site more effectively.
How can I test if my domain redirect is working?
Test the redirect by typing your old domain into a browser to see if it takes you to the new one. You can also use various online tools to confirm it’s working properly.
Other Related Tutorials & Blogs:
– How To Fix DNS_PROBE_FINISHED_NXDOMAIN Error
– How to Backup Your WordPress Site: A Comprehensive Guide
– How To Configure WordPress Error Logs: Identify & Fix Issues
– How to Fix 502 Bad Gateway Error in WordPress
– Domain vs. URL: A Definitive Guide to Understanding Web Addresses
- About the Author
- Latest Posts
Rhett isn’t just a writer at Hosted.com – he’s our resident WordPress content guru. With over 6 years of experience as a content writer, with a background in copywriting, journalism, research, and SEO, and a passion for websites.
Rhett authors informative blogs, articles, and Knowledgebase guides that simplify the complexities of WordPress, website builders, domains, and cPanel hosting. Rhett’s clear explanations and practical tips provide valuable resources for anyone wanting to own and build a website. Just don’t ask him about coding before he’s had coffee.