To redirect a URL in cPanel, open cPanel, go to the Domains section, and click Redirects. Enter the old path, choose the destination URL, and pick a permanent (301) or temporary (302) redirect. cPanel writes the rule into your site's .htaccess file so visitors and search engines are forwarded automatically. This guide covers when to use each type and how to set one up correctly.

301 vs 302: choose the right type first

The redirect type tells browsers and search engines whether the move is permanent, and it directly affects SEO, so choose deliberately.

  • Permanent (301): use this when a page has moved for good. Search engines pass ranking signals to the new URL and update their index. This is the correct choice for most content moves, HTTP to HTTPS, and www vs non-www consolidation.
  • Temporary (302): use this for short-lived situations, such as a maintenance page or a seasonal promotion, where you want the original URL to keep its ranking.

If you are unsure, a 301 is usually what you want. See Google's guidance on redirects and site moves for how each type is treated.

Create a redirect in cPanel

  1. Log in to cPanel and, in the Domains section, click Redirects.
  2. Under Type, select Permanent (301) or Temporary (302).
  3. From the https?://(www.)? dropdown, choose the domain the old URL lives on.
  4. In the box after the domain, type the path you want to redirect, for example /old-page.html. Leave it blank to redirect the entire domain.
  5. In the Redirects to field, enter the full destination URL, including the protocol, for example https://www.example.com/new-page.html.
  6. Under www. redirection, pick whether the rule should match both the www and non-www versions. Redirect with or without www. is the safest general choice.
  7. Tick Wild Card Redirect only if you want every sub-path of the old location sent to the matching path at the destination.
  8. Click Add. cPanel shows a confirmation and writes the rule to .htaccess.

Test the result in a private browser window. A correctly configured permanent redirect returns an HTTP 301 status and lands on the new URL.

Old URL /old-page.html New URL /new-page.html 301 permanent

What cPanel writes to .htaccess

Behind the scenes, cPanel adds an Apache rewrite rule. A single-page 301 looks similar to this:

RewriteEngine On
RewriteRule ^old-page\.html$ https://www.example.com/new-page.html [R=301,L]

On LiteSpeed servers, the same .htaccess syntax is read natively, so your redirects behave identically. You can edit these rules by hand in the File Manager if you need patterns that the Redirects interface does not expose.

Removing or changing a redirect

Return to Redirects, find the rule under Current Redirects, and click Delete. Because browsers cache 301 responses aggressively, clear your local cache or test in a fresh private window after any change. For full details on cPanel's redirect tool, see the official cPanel documentation.

A note on redirects and your search footprint

Redirects preserve the link equity you have built, which matters when you consolidate domains or migrate content. Combined with a dedicated Class C IP, keeping your redirect chains short and clean helps search engines crawl the destination efficiently. For more procedures like this one, browse our cPanel and technical guides, or contact us if you need help planning a larger migration.

Var dette svaret til hjelp? 0 brukere syntes dette svaret var til hjelp (0 Stemmer)