How to forward or redirect your domain in cPanel
A redirecting also known as forwarding allows you to make one domain or web page redirect to another domain or web page.
Read our What is domain forwarding or pointing article for more insight on pointing a domain.
- Log into ClientZone.
- Select the ‘Hosting’ tab.
- Under the Shared Hosting section, select the domain you wish to edit from the list on the right-hand side.
- Click on the ‘Website Manager’ button.
- Select ‘Log into Website Manager’.
- Scroll down to the ‘Domains’ section and select ‘Redirects’.
- In the 'Type' dropdown, choose to create either a Permanent (301) or Temporary (302) redirect.
A 301 redirect is a status code that tells search engines the site for your domain has permanently moved to the new destination URL.
When someone types your domain in the address bar, a 301 redirect will send visitors to the destination URL, and that new URL will show in the browser address bar. Use a 301 redirect for content that's permanently removed.
What is a 302 Redirect?
A 302 redirect is a temporary redirect and directs users and search engines to the desired page for a limited amount of time until it is removed, so the search engine should not update the URL of the content. Use a 302 redirect for inactive campaigns.
- Under the ‘https?://(www.)?’ dropdown, select the domain you want to forward/redirect.
- You can select ‘**All Public Domains**’ to redirect ALL the domains under your cPanel account.
- To redirect a specific page or directory (such as home.html) enter the name of the folder or file in the blank forward slash '/' field. Eg:/afrihostanswers.com/blog
Only the 'blog' page of afrihostanswers.com will redirect to blog.afrihost.com. This means we have redirected afrihostanswers.com's blog page to afrihost.com's blog page.
- In the ‘Redirects to’ box, enter the URL address you want the site traffic redirected to, including the protocol e.g. http:// , https://
An example of a redirect. In our example above, any user trying to visit the URL www.afrihostanswers.com will be automatically redirected to https://help.afrihost.com/.
- In the www.redirection: section, select how you want to handle ‘www.’ redirects:
- Only redirect with www.: This setting only redirects visitors who enter the www. prefix before the domain name part of the URL.
- Redirect with or without www.: This setting redirects all users, regardless of whether the visitor enters the www. prefix before the domain name part of the URL.
- Do Not Redirect www.: This setting does not redirect users who enter the www. prefix before the domain name part of the URL.
- Select the ‘Wild Card Redirect’ option if you want a wild card redirect. Selecting this option redirects all files within a directory to the same filename in the new directory.
afrihostanswers.com/test.php redirects to help.afrihost.com/test.php
- Once you are done, click on ‘Add’.
You have now successfully created a domain redirect.
Before testing, ensure that your hosting caches and local caches have been cleared. Using an incognito Chrome window is recommended at this point because the browser often caches redirects behind the scenes, and you will not see changes to existing redirects in real-time.
In cases where you have changed your business name, a domain forwarder is a great way to make sure all of your old email address correspondence is received at the new domain addresses. Read our article on How to create an email forwarder in cPanel for further assistance.