You can set redirections on websites hosted on Linux and Windows Servers.
Through Windows Servers:
There are three ways of doing URL redirects.
1. HTTP Redirects From IIS:
Open IIS (Internet Information Services) Manager from the start menu. Scroll to Administrative Tools and select IIS Manager. In the connections pane expand the server name and the site. Navigate to the domain. Click twice on the HTTP Redirect Option. Select the Redirect Request and mention the URL to which you wish to redirect the site to. You then get a few options
a. Redirect all request to exact destination
b. Redirect requests to content of this directory only (without sub-directories)
Status Code: Select the status code 301, 302 and 307 and click on Apply after selecting the appropriate option.
2. Redirect From Website Panel:
Log in and click on Web > websites. Choose Home Folder tab.
Select Redirection to URL. Paste the URL to which you want to redirect the contents. Select the appropriate option
a. Redirect all requests to exact destination
b. Redirect only the content of this directory.
3. Redirects From URL Rewrite Module:
You can create custom rewrite rules which will enable you to perform redirects, send responses, stop HTTP) requests. You can refer the Microsoft guide to create and write your rules.
In Linux Servers:
To set up a 301 redirect or a permanent redirect you must access your website files. Log in to your account via File Transfer Protocol(FTP).
Go to .htaccess in the public_html. It is the web directory of the website that you wish to redirect from.
Add Redirect 301/ old-directory-name/ new directory -name .
You may also 301 redirect to a new domain in the same way.
After adding the rule save the .htaccess file. The same process applies for every Linux servers.