Bluehost is a famous Linux PHP hosting service provider with a lot of useful hosting features, including the easy 301 redirection which we are going to discuss in this article.
A 301 redirect is a permanent redirect which is not only SEO friendly, but also more user friendly when compared to a 302 redirect. A permanent redirect will notify the visitor’s browser and search engines, like Google, Bing, Yahoo, to update any bookmarks that are linked to the page that is being redirected.
To redirect a PHP website from one domain to another, from an URL to another or from one file to another, you may think about 301 redirection via the .htaccess file, but we will introduce you an easier way for that. It does not work with Bluehost, you can actually follow this guide to redirect your websites that are hosted on most cPanel managed web servers.
Setup cPanel 301 Redirect with Bluehost
1. Login to your Bluehost cPanel account.
2. Click the Redirects icon, in the Domains section of the cPanel.
3. Tick the Permanent (301) option.
4. 301 Redirect from Domain or URL
Input your domain which you like to redirect. If it is a subfolder, enter its folder name in the field after the main domain name.
5. 301 Redirect to Domain or URL
There is a redirect to field just below the source domain or URL, you need to enter the full target domain or URL here. Note that the destination domain or URL can start with different protocols, e.g. http://, https:// or ftp://
6. Select 301 Redirect options
“Only redirect with www.”
This option will only redirect visitors that use www. as part of the URL.
“Redirect with or without www.”
This option will redirect all visitors.
“Do Not Redirect www.”
This option will not redirect visitors that use www. as part of the URL
Wild Card Redirect
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.
7. Finish the Redirection
Click Add this redirect to finalize the 301 redirect setup.
If your website is based on WordPress, you have more flexible ways to set up 301 redirect for WordPress sites.