Home / Guides / Domains

3 min read ยท Updated

Redirect a domain or page

Send visitors from one address to another — an old page to a new one, www to non-www, or an entire domain to a different site.

Use the Redirects tool

  1. In cPanel, open Redirects.
  2. Choose a redirect type:
    • Permanent (301) — tells search engines the move is final. Use this for most cases.
    • Temporary (302) — keeps the original URL in search results. Use this for short-term changes.
  3. Select the domain from the dropdown, and type the path you want to redirect (e.g. /old-page). Leave the path blank to redirect the entire domain.
  4. Enter the full destination URL, including https://.
  5. Click Add.

Redirect www to non-www (or vice versa)

The easiest way is with an .htaccess rule. Open File Manager, navigate to public_html, and edit .htaccess. Add one of these blocks at the top:

Non-www to www:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

www to non-www:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

Remove a redirect

Back in Redirects, your existing redirects are listed at the bottom. Click Delete next to the one you want to remove.

If you're redirecting to keep search rankings, a 301 is almost always what you want. Search engines transfer most of the original page's ranking to the new URL.

← All guides

Stuck on a step? Email support@dredgehost.com and we'll help you sort it out.

Did this guide help? A short review on Trustpilot helps other people find a small host they can trust.