How to add 301 (Permanent) and 302 (Temporary) redirects

This guide explains how to manage 301 (Permanent) and 302 (Temporary/Found) redirects in cPanel.

You may need to add redirects if you change your websites address, or the names of pages or posts. This can be a great way to ensure you retain any ranking those pages have with search engines.

Whilst you can set up redirects in cPanel - if you are using a Content Management System (CMS) like WordPress you might find it easier to use a Redirection plugin.

  1. Open the Redirects control panel - cPanel > Domains > Redirects.
  2. Type: Select Permanent (301) or Temporary (302). If the redirection is permanent select 301 - if it is temporary select 302.
    Select the domain being redirected from the drop-down list. The title above this field - https://(www)? - will change based on the option you select further down under www. redirection.
    To redirect a specific file, path or regular expression enter it in the / field.
    Redirects to: enter the URL to redirect to including the protocol e.g. http:// https:// or ftp://
    Wild Card Redirect: this will redirect all files after the domain to their exact match at the new domain. Selecting this will disable selection of www. redirection option.
  3. Click Add to create the redirection.

Problems?

If your redirection doesn't work as expected, then read:

Redirection not working, or unexpected redirection occurring


How did we do?


Powered by HelpDocs (opens in a new tab)
© Krystal Hosting Ltd 2002–