Here is a step-by-step guide to set up .htaccess redirect:
1. Setup a Redirect
- log in to your Just Host cPanel account.
- Click on the Redirects icon, which is located in the Domains section of the cPanel.
2. Choose 301 or 302 Redirect
- From the Type menu, choose which type of redirect to use.
- Permanent 301 redirects will update the visitor’s bookmarks and direct search engines to the new site.
- Temporary 302 redirects will redirect the visitor or search engine, but will not update the bookmark and the search engine will continue to index to the original page.
- Choose “Redirect 301” for a permanent redirect and “Redirect 302” for a temporary redirect. By default, the system will choose “Redirect 302”, if it is not otherwise specified.
3. Set URL to Redirect
- From the drop-down menu, choose your domain name you would like to redirect.
- If you would like to redirect a single page or directory; just use the text field following the drop-down menu to enter the file name or folder name.
4. Enter Destination URL
- In the “redirects to ->” text field, please enter the full URL of the page you will be redirected to
- Enter the protocol as well, e.g. http://, https:// or ftp://
5. Select WWW Redirect Options
- Select whether you will be redirecting www. or not.
- “Only redirect with www.” option will only redirect visitors that use www. as their part of the URL
- “Redirect with or without www.” option will redirect all visitors.
- “Do Not Redirect www.” option will not redirect visitors that use www. as their part of the URL
6. Use the Wild Card Redirect
- if you would like to redirect to the same file at the new destination, click the “Wild Card Redirect’
- For example, from WWW.EXAMPLE.COM REDIRECTS to
WWW.EXAMPLE-DESTINATION.COM
- With “Wild Card Redirect”, www.example.com/about.html will redirect to www.example-destination.com/about.html
- Without “Wild Card Redirect, www.example.com/about.html will redirect to www.example-destination.com
- Create the redirect by clicking on the “Add” button
- If you are not hosting with us, or only have a domain name, you will need to redirect your domain name by updating the DNS.