How to Set Redirection for the websites hosted on Windows and Linux servers?

This article describes how to set redirections in the websites hosted on Linux and Windows machines. We will discuss following three cases to set redirection.

  1. Set redirection through domain control panel (at registrar level)
  2. Set redirection in Windows Server
  3. Set redirection in Linux Server

1) Set redirection through domain control panel (at registrar level)

Domain registrars allow you to set up the URL redirects to point your domain/sub-domain to any destination page. The key benefit of this method is that; you do no need to purchase web hosting services for source domain and it will take into effect within minutes. If you wish to take the benefit of this method, you will have to use default nameservers of registrar. At domain registrar, URL redirects can be set via 2 methods.


1.1) Domain forwarding/URL forwarding

With domain forwarding method, your domain visitors will be redirected to the specified destination website automatically. For example; suppose you have set up the domain forwarding from to Now when your visitors browse your website, they will be automatically redirected to The real problem with the domain forwarding is that, browser address bar will display the destination domain (i.e. This problem can be rectified with Domain Masking/Frame Redirect.


1.2) Domain masking/Frame redirect/URL masking

URL Masking/Frame Redirect is another type of domain forwarding method that prevents your visitors from seeing the destination URL in browser address bar by keeping the actual domain name. In simpler words, your vistors will load the destination page while keeping the actual URL in browser's address bar. For Example; if you have set URL masking for domain to then whenever anyone browses the, they will actually see the content of but the address bar will still display the

If you have purchased the domain registration services from, you can raise a support ticket from your client area to set the Domain forwarding. If you have registered your domain to some other registrar, you can contact your registrars to do it for you.

2) Redirection in Windows server/VPS

For Windows based servers, there are mainly three options to set URL redirects.

2.1) Redirection from WebsitePanel

To set redirection from WebsitePanel, you can refer to our knowledgebase article.

2.2) HTTP redirect from IIS

To set redirection from IIS through HTTP redirect method, you can follow our knowledgebase article here.  

2.3) Rewrite rules through URL rewrite module

IIS URL rewrite module enables a web admin to create search friendly, easy to remember yet powerful rewrite rules. URL rewrite also allows you to perform redirects, send custom responses, stop HTTP requests according to logic expressed in the rewrite rules. URL rewrite module is available to use as an extension to IIS and can be downloaded from here. To create and test a set of rewrite rules, refer to Microsoft guide here.


3) Redirection in Linux server/VPS

In Linux based hosting, URL redirection can be set either through cPanel Redirects or .htaccess file.

3.1) Domain redirection through cPanel Redirects

Refer to following video tutorial to redirect your domain’s visitors from a source URL to a target URL through cPanel Redirects.

3.2) URL redirect using the .htaccess file

Refer to following guides for more information to create .htaccess redirection rules.

Related Articles

Resolved Chrome Error : ERR_SPDY_PROTOCOL_ERROR

Problem: When you browse popular sites like Gmail, Wikipedia, Facebook, Twitter, Youtube etc on...

I am unable to connect to my Windows VPS through RDP.

There could be plenty of reasons for not being able to connect to Windows VPS via Remote Desktop....

How to Create & Manage VPS under your Windows VPS reseller Plan?

If you're purchasing a 10 GB of RAM VPS plan, you can create 10 VMs with 1 GB RAM each or 5 VMs...

How to fix IIS HTTP Error 502.5 in ASP.NET Core?

You may encounter the below error while deploying an ASP.NET Core application in IIS.  HTTP...

How to Open Ports in Firewall on Windows Server 2016?

Following article will assist you to open ports in Firewall on Windows VPS with Windows Server...

  • 0 Users Found This Useful

Was this answer helpful?