How to set up a redirect in cPanel

  1. Open "Redirects" (group "Domains").
  2. "Type" - "Permanent (301)" for a permanent move, "Temporary (302)" for a while.
  3. Select the domain. "** All Public Domains **" applies to all domains of the account.
  4. In the field after /, enter the old page, for example old-page.html. Leave it empty to redirect the whole domain.
  5. In "Redirects to", enter the full new address, for example https://example.com/new-page/.
  6. "www. redirection" - usually "Redirect with or without www.".
  7. Click "Add".
New redirect
New redirect

The redirect appears under "Current Redirects". The panel writes it to .htaccess in the site folder.

With .htaccess

Redirect 301 /old-page.html https://example.com/new-page/

Redirect the whole site to a new domain keeping page addresses:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?old-domain\.com$ [NC]
RewriteRule ^ https://example.com%{REQUEST_URI} [L,R=301]

The https redirect is a separate switch: HTTPS redirect.

Questions and answers
301 if the address changed for good. 302 for a while, for example during maintenance.
Under "Current Redirects", click "Delete" in its row.