There are several methods for redirecting a domain or website. We will go over some of the most common methods here.

Sections


Accessing your cPanel

In order to redirect your website, you will first need to log into your cPanel. If you do not know how to access your cPanel directly, you can find out here.

Once you are logged into your cPanel, you have several methods of redirecting your website. Which one you use is up to you.

Back to Menu


Domain Alias

If you want all of your domain traffic to redirect to a different domain, then an alias is your best bet. An alias domain will send all web traffic, whether web site or emails, to the target domain. Any emails sent to the alias domain will be redirected to the target domain as well.

email@alias.com  >  email@target.com

Domains

You will find the Alias app in the Domains section. Or, if you are on a newer version of cPanel, you will access if from the Domains app (in the Domains section, nothing confusing there).


Aliases

You can now create an alias by entering the domain in the Create a New Alias field and clicking Add Domain.

Aliases

This will create the zone file for your Alias domain. You will now need to set the domain to use our nameservers. There is a guide on how to update nameservers here.

Once you are back at the Aliases page, you should see your alias domain in the list of aliases at the bottom of the screen. By default, your alias domains will redirect to your primary domain. You can edit your alias target by clicking on Manage Redirection to the right of the domain.

If you wish to remove the alias, click on the Remove button.


Domains

On newer versions on cPanel, you will add an alias in the Domains app.

Domains

Once you open the app, you will see the Create a New Domain button on the right-hand side. Click this to start.

Add Domain

You will now need to enter the alias domain name at the top of the page, in the Domain section.

In the Document Root (File System Location) section, you will see an check box that states "Share document root (/home/example/public_html) with example.com”."

For an alias, you will want to check this box. If you are creating an alias for a domain other than your primary domain, you will want to enter the path to that domains document root folder in the field. Once you have the alias domain and the document root entered, click on Submit to complete.

This will create the zone file for your Alias domain. You will now need to set the domain to use our nameservers. There is a guide on how to update nameservers here.

If you need to remove the domain, this can be done from the Domains section.

Back to Menu


Website Redirect using cPanel

If you only wish to redirect your website, you can set this up in cPanel using the Redirects app, found in the Domains section. The advantage of using this method is that you redirect only parts of your domain to another server. This is helpful if you want to redirect the website, but not the emails or other services. You can also only redirect parts of you website using this tool.

Domains

Once you find the Domains section, click on the Redirect app.

Redirects

When the page loads, you will see the top part is where you can Add Redirect.

  • Type
    • Here you can choose between Permanent (301) or Temporary (302)
    • Permanent will notify the users browser to update bookmarks that are linked to the page
  • Https?://(www.)?
    • While this is a crazy title for this field, it is only asking for what domain you are looking to redirect
    • Select from the drop down menu.
  • /
    • Here you can select what subfolder of the domain to redirect.
    • Leave this field blank to redirect the whole site
  • Redirects to
    • This is the target domain
  • www. Redirection:
  • Wild Card Redirect
    • Checking the Wild Card Redirect Box will redirect all files within a directory to the same filename in the redirected directory.
    • You cannot use a Wild Card Redirect to redirect your main domain to a different directory on your site.

Once you have all of the fields filled in, click Add to create the redirect.

You will also see all of your current redirects at the bottom of this page. You can remove them from here if needed. Unfortunately they cannot be modified, you will need to delete the current redirect and add it back.

Back to Menu


Redirect using the .htaccess

Finally, you can redirect some, or all of your website by adding some code to your .htaccess file in your document root folder. An .htaccess file is a configuration file that is used to overwrite certain server configurations, and can be a very useful tool. This method is for advanced users and requires a general knowledge of html coding.

You can create or edit your .htaccess file from your cPanel File Manager, found in the Files section.

Files

You should find the .htaccess file in your domain document root folder, typically the public_html folder. If you do not see it, it could be that is hidden or not created yet.

To show hidden files, click on the Settings button in the upper-right hand side. Now ensure that the Show Hidden Files (dotfiles) option is checked and click Save.

If you still do not see the .htaccess file, you will need to create one. Click on the + File button in the upper left-hand side. When the window pops up, enter .htaccess as the new file name and click Create New File.

Now you can edit your .htaccess file. If there was a one created already, then there is most likely some code in there already. You can disable any code in there by preceding it with "#". This will allow you to reenable it if needed. If you are redirecting the site, you can disable all of the other lines.

Now you can add the redirect code. It should look something like this:

# Redirect to HTTPS
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule ^(.*)$ https://www.newdomain.com/$1 [R=301,L]

Make sure you replace olddomain.com with the site you are looking to redirect and www.newdomain.com with your target.

Save the edited .htaccess file. The next time you visit the site, you should be redirected to the new site. You may need to clear your cache and cookies first.

Back to Menu


Still Having Issues?

If you are still having issues, you can contact our Customer Support in the following methods:

Live Chat

You can connect to our Live Chat Support Team from your MacHighway Client Area. If you are not sure how to do this, you can find a guide here.

Our Live Chat team is available Monday to Friday from 9:00 AM to 7:00 PM Eastern Time.

Support Ticket

You can submit a support ticket to our Support Team from your client area.

Our ticket Support Team is available 24/7/365.

Phone support

You can contact our Phone Support Team using the following number:

  • US/Canada 1-888-974-0334
  • International 1-727-800-3606

Our Phone Support team is available Monday to Friday from 9:00 AM to 7:00 PM Eastern Time.

Bu cavab sizə kömək etdi? 30 istifadəçi bunu faydalı hesab edir (165 səs)