What is a redirect?
A redirect is like a sign on a shop door that says "We moved. Go to the new address." The visitor types the old domain. The browser then goes to the new one.
A permanent redirect (code 301) tells search engines that the move is for good. A temporary redirect (code 302) says the move is only for a while. Use permanent when you moved for good.
Before you start
- The old domain must point to your hosting. Check its nameservers or A record.
- The old domain must be added to your hosting account, for example as a domain in cPanel.
- Changing redirects affects a live site. Note down your current settings first.
Method 1: cPanel Redirects
- Log in to cPanel. Your welcome email shows how.
- Find the Domains section and click Redirects. In older versions it is on the main page.
- Next to Type, choose Permanent (301).
- Pick the old domain from the list under https?://(www.)?.
- In the box after the slash, leave it empty to redirect the whole site.
- In Redirects to, type the full new address, for example
https://new-name.com. - Choose Redirect with or without www so both forms are covered.
- Click Add.
Method 2: the .htaccess file
The .htaccess file is a small settings file in your site folder. Open it in File Manager. Back it up first. A typing error can make the site show an error.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?old-name\.com$ [NC]
RewriteRule ^(.*)$ https://new-name.com/$1 [R=301,L]
This sends every page on old-name.com to the same page on new-name.com. Change the two names to yours.
Check the result
- Type the old domain into your browser.
- Check that it lands on the new domain.
- Try an inner page too.
If it does not work, open a ticket at https://secure.hostvento.com/submitticket.php.
Quick recap
- A redirect sends visitors from one address to another.
- Use 301 for a permanent move.
- In cPanel, use the Redirects tool.
- Or add rules to .htaccess after a backup.
- Test in a private window.