New Customers: 50% OFF Your First Month on All VPS Servers & Web Hosting Plans!

How to Redirect your website to any page or external domain?

Learn how to redirect your website or specific pages to another domain or URL using cPanel. This guide covers permanent and temporary redirects, HTTPS enforcement, and manual .htaccess rules for applications that bypass panel settings.

HostworldDomains & DNS 4 min read Updated 23 Sep 2026

Use cPanel: go to Domains then Redirects, choose 301 or 302, select your domain, add the path if needed, enter the full destination URL including http:// or https://, set the www option and save. For HTTP to HTTPS, use the Force HTTPS Redirect toggle in Domains rather than adding a manual redirect.

Before you start

  • You need cPanel access for the hosting account that serves the site.
  • Decide if the move is permanent (301) or temporary (302). Google recommends permanent redirects for site moves.
  • For HTTPS, plan to use the Force HTTPS Redirect toggle in cPanel > Domains.

Step 1: Decide the redirect type and scope

A 301 is permanent. A 302 is temporary. 301s are cached more aggressively by browsers and search engines. Pick the exact domain to redirect or choose All Public Domains if you want it to apply to every domain in the account. Choose whether it should affect only a specific path or the entire site. If you want to keep filenames when sending visitors to another host or subdomain, you will enable Wild Card Redirect in the next step.

Step 2: Create the redirect in cPanel

  1. Log in to cPanel, open Domains, then Redirects.
  2. Select 301 (Permanent) or 302 (Temporary).
  3. Choose your domain, or All Public Domains.
  4. In the path box, enter the path to redirect, or leave it blank to redirect the whole site.
  5. In Redirects to, enter the full destination URL including the protocol. Example: https://new.example.com/landing.
  6. Set the www handling to your preference.
  7. Tick Wild Card Redirect if you want to keep the requested filename and send it to the same path on the destination. Example: /blog/post-a goes to https://new.example.com/blog/post-a.
  8. Click Add.

To force HTTPS, go to Domains in cPanel and switch on Force HTTPS Redirect for the domain. This is the recommended method for HTTP to HTTPS.

Note: you cannot edit a redirect in cPanel. To change one, delete it on the same screen then recreate it. cPanel writes new rules at the bottom of your account’s .htaccess file.

Step 3: Test without cached results

Open a private window and test the old URL. To see the status and Location header directly, use:

curl -I http://yourdomain.tld/old-path

Expect 301 or 302 with a Location header showing the new URL.

Step 4: If your app ignores panel rules, add it to .htaccess manually

Some applications only honour rules in their own .htaccess section. In cPanel File Manager, show hidden files, then edit the .htaccess in your site’s document root. Examples:

# Entire site to another host
Redirect 301 / http://example.com/

# One page to a new page
Redirect 302 /original.html http://www.example.com/new.html

# Preserve a section to another host with query strings
RewriteEngine On
RewriteRule "^/docs/(.*)$" "http://docs.example.com/$1" [R=301,L,QSA]

Notes: Redirect and RedirectMatch are mod_alias and run before most mod_rewrite rules. Use mod_rewrite only when you need conditions or regex. With mod_rewrite, [QSA] appends the original query string and [QSD] discards it.

If it does not work

  • You still see the old page or no redirect. Browsers cache 301s. Test in a private window, another browser or use curl. If a CMS is installed and the panel rule is ignored, add the rule to .htaccess as in Step 4.
  • It loops between URLs. Remove duplicate or conflicting rules. If WordPress is in use, ensure WordPress Address and Site Address match in Settings, avoid mixing a plugin redirect with cPanel’s Force HTTPS Redirect, and disable the plugin if you are locked out.
  • You get a 500 error. A syntax error in .htaccess causes an Internal Server Error. Reopen File Manager and roll back the last change or comment out new lines. Save and retest.

If you are stuck, open a support ticket so we can review your .htaccess and cPanel settings.

What next

For server-side methods on VPS stacks such as NGINX or IIS, see our VPS guides. If you prefer us to check your redirect plan before you switch it on, open a support ticket and include the source URL, the intended destination and which code you want to use.

Common questions

What's the difference between a 301 and 302 redirect?

A 301 is permanent and cached more aggressively by browsers and search engines. A 302 is temporary. Google recommends 301 redirects for site moves.

How do I redirect HTTP to HTTPS?

Use the Force HTTPS Redirect toggle in cPanel under Domains. This is the recommended method and is simpler than adding a manual redirect.

Why is my redirect not working?

Browsers cache 301 redirects, so test in a private window or use curl. If you have a CMS installed, the panel rule may be ignored and you'll need to add the rule to .htaccess instead.

What does Wild Card Redirect do?

When enabled, it preserves the filename and path when redirecting. For example, a request for /blog/post-a will redirect to the same path on the destination domain.

Can I edit a redirect in cPanel after creating it?

No. You must delete the redirect and recreate it with the new settings.

Was this article helpful?