How to Set Up 301 Redirects in HostEase
Redirects allow you to make a specific web page redirect to another page and display the contents of that page, which is benefit for both search engine and website management. Therefore, as a website designer, we should be familiar with this function. In fact, some website owners may know how to use 301 redirects while some do not know how to use it. Today I will share with you about this feature.
i.Achieve this function in cPanel
Firstly, log in your cPanel. Go to “Redirects” under “Domains” column. Click it and then you can set 301 redirects here. Please note that there are two types of redirects, permanent redirects (301) and temporary redirects (302). The difference between them is: the permanent redirect will notify the visitor’s browser to update any bookmarks that are linked to the page that is being redirected, while temporary redirects will not update the visitor’s bookmarks. People may choose permanent one at most cases. Now, let’s come to the point. You need to fill in with the domain which you want to make 301 redirects, and also the domain you want it redirects to. Then choose one condition of the three listed as following—only redirect with www, redirect with or without www. and do not redirect www. After this, click “Add” button, and now a 301 redirects would be set up successfully.
ii. Set up the redirects via .htaccess file
Go to the root directory of your website contents hosted, and type such code to .htaccess file under this directory:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [NC]
RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]
Then save it. In this way, a 301 redirects can also be achieved.
In a word, 301 redirects is a effective way for your website when you plan to move your website or change the domain of your website. Hope this can be helpful to you.