Skip to main content

Domain Forwarding & Redirects at HostBible(301 vs 302, www ↔ non-www, URL forwarding)

Redirects (often called domain forwarding or URL forwarding) automatically send visitors from one URL to another. In HostBible, the easiest way to manage common redirects is through cPanel → Domains → Redirects.

Z
Written by Zoe Handscomb
Updated over 3 months ago

301 vs 302 Redirects (What to use and when)

301 (Permanent)

Use 301 when the change is permanent and you want search engines and browsers to treat the new URL as the “main” one.

Use this when…

  • You moved your website from old-domain.com to new-domain.com.

  • You’re standardizing your site to one version (like non-www → www).

  • You renamed a page permanently: /old-page → /new-page.

302 (Temporary)

Use 302 when the redirect is temporary and you expect to switch back.

Use this when…

  • You’re sending visitors to a temporary “maintenance” page.

  • You’re testing a new page or domain briefly.

  • A page is temporarily unavailable and you’ll restore it.

Tip: If you’re unsure, start with 302 while testing. Switch to 301 once you’re confident it’s the final setup.


Before you start (quick prerequisites)

  1. The source domain must point to your HostBible hosting account (otherwise the redirect can’t run because the traffic never reaches the server).

  2. Know your target URL (including whether it should be http:// or https:// — see the HTTPS note below).


How to open the Redirects tool in HostBible cPanel

  1. Log in to HostBible cPanel.

  2. Go to Domains.

  3. Click Redirects.
    (If you don’t see it right away, use the cPanel search bar and type “Redirects”.)


Redirect one domain to another (domain forwarding)

This is used for “Send everything from Domain A to Domain B”.

Option A: Redirect the domain to a single destination (no path kept)

Example:
old-domain.com/anything → new-domain.com

  1. In cPanel → Domains → Redirects

  2. Set Type to:

    • 301 for permanent moves

    • 302 for temporary forwarding

  3. Under https?://(www.)?, select the source domain (the old domain).

  4. Leave the path box empty (or / if required by your cPanel theme).

  5. In Redirects to, enter the full destination, for example:
    https://new-domain.com

  6. Under www., choose how you want it applied:

    • Redirect with or without www. (most common)

  7. (Optional) Wild Card Redirect: leave unchecked for this option.

  8. Click Add.

Result: All requests go to the single destination URL you entered.


Option B: Redirect the domain and keep the same page path (recommended for site moves)

Example:
old-domain.com/about → new-domain.com/about
old-domain.com/blog/post1 → new-domain.com/blog/post1

  1. In cPanel → Domains → Redirects

  2. Set Type to 301 (for a permanent move).

  3. Select the source domain.

  4. Leave the path box empty.

  5. In Redirects to, enter:
    https://new-domain.com

  6. Under www., choose Redirect with or without www.

  7. Check Wild Card Redirect.

  8. Click Add.

Result: The redirect “follows” the path automatically.


Redirect a specific page path (URL forwarding for one page)

Yes, this is supported in cPanel → Domains → Redirects by using the path box.

Example:
example.com/old-page → example.com/new-page

  1. In cPanel → Domains → Redirects

  2. Choose Type (301 if permanent, 302 if temporary).

  3. Select the domain where the old page exists.

  4. In the path box, enter the old path (no domain), for example:
    old-page
    (You can also use old-page/ if it’s a folder-style URL.)

  5. In Redirects to, enter the full new URL, for example:
    https://example.com/new-page

  6. Under www., usually choose Redirect with or without www.

  7. Click Add.

Notes

  • This method is great for renaming pages or fixing old links.

  • If you need to redirect an entire folder and keep filenames, use Wild Card Redirect (advanced use).


Force www ↔ non-www (pick one “main” version)

Choose one direction only (don’t set both), or you’ll create a redirect loop.

Force non-www → www

Example: example.com → www.example.com

  1. Go to cPanel → Domains → Redirects

  2. Type: 301

  3. Select your domain (e.g., example.com)

  4. Leave the path empty

  5. Redirects to:
    https://www.example.com

  6. Under www., choose Do Not Redirect www.

  7. Click Add

Why this works: It redirects only requests without www.


Force www → non-www

Example: www.example.com → example.com

  1. Go to cPanel → Domains → Redirects

  2. Type: 301

  3. Select your domain (e.g., example.com)

  4. Leave the path empty

  5. Redirects to:
    https://example.com

  6. Under www., choose Only redirect with www.

  7. Click Add

Why this works: It redirects only requests with www.


HTTPS note (when SSL is enabled)

  • If your domain has SSL enabled, your working site URL is typically https://.

  • When creating redirects, use a destination that matches your real site, for example:
    https://example.com (not http://example.com)

  • If you redirect visitors to https:// but SSL is not active for that domain, visitors may see a browser security warning.

Important: This article doesn’t cover SSL setup—just make sure SSL is enabled before forcing https:// destinations.


Troubleshooting

1) Redirect loop / “Too many redirects”

Common causes:

  • You created both www → non-www and non-www → www redirects.

  • You have overlapping redirects (cPanel Redirects + app/CMS redirect + HTTPS redirect).

  • Destination URL redirects back to the source.

Fix steps:

  1. Go to cPanel → Domains → Redirects.

  2. Scroll down to the list of Current Redirects.

  3. Remove any duplicates or conflicting rules (use the Remove link).

  4. Keep only one canonical rule (either www or non-www).

  5. If your site/application also forces redirects (for example via a plugin), disable one side so you only have one placedoing the redirect.


2) Redirect goes to the wrong destination

Check:

  1. In cPanel → Domains → Redirects, confirm the source domain and path are correct.

  2. Confirm the destination includes the correct protocol: https:// vs http://

  3. If you enabled Wild Card Redirect, remember it will append paths automatically:

Fix:

  • Remove the incorrect redirect and create it again with the corrected destination.
    (cPanel redirects are usually removed/re-added rather than edited.)


3) Changes not taking effect

Most common reasons:

  • Browser cache (especially with 301 redirects)

  • Domain isn’t pointing to your HostBible account yet

  • Conflicting rules still exist

Fix steps:

  1. Test in a private/incognito window or a different browser/device.

  2. If you used 301, clear cache or try a new browser (301s can be “sticky”).

  3. Confirm the source domain points to your HostBible hosting (otherwise the redirect won’t run).

  4. Re-check cPanel → Domains → Redirects for older rules and remove them.


Quick best practices

  • Use 301 for permanent moves and “main URL” choices (www vs non-www).

  • Use 302 for temporary forwarding/testing.

  • Use Wild Card Redirect when moving an entire site and you want to keep page paths.

  • Avoid stacking multiple redirect systems (cPanel + app + HTTPS plugin) unless you know exactly how they interact.

Did this answer your question?