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)
The source domain must point to your HostBible hosting account (otherwise the redirect can’t run because the traffic never reaches the server).
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
Log in to HostBible cPanel.
Go to Domains.
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
In cPanel → Domains → Redirects
Set Type to:
301 for permanent moves
302 for temporary forwarding
Under https?://(www.)?, select the source domain (the old domain).
Leave the path box empty (or / if required by your cPanel theme).
In Redirects to, enter the full destination, for example:
https://new-domain.comUnder www., choose how you want it applied:
Redirect with or without www. (most common)
(Optional) Wild Card Redirect: leave unchecked for this option.
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
In cPanel → Domains → Redirects
Set Type to 301 (for a permanent move).
Select the source domain.
Leave the path box empty.
In Redirects to, enter:
https://new-domain.comCheck Wild Card Redirect.
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
In cPanel → Domains → Redirects
Choose Type (301 if permanent, 302 if temporary).
Select the domain where the old page exists.
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.)In Redirects to, enter the full new URL, for example:
https://example.com/new-pageClick 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
Go to cPanel → Domains → Redirects
Type: 301
Select your domain (e.g., example.com)
Leave the path empty
Redirects to:
https://www.example.comClick Add
Why this works: It redirects only requests without www.
Force www → non-www
Example: www.example.com → example.com
Go to cPanel → Domains → Redirects
Type: 301
Select your domain (e.g., example.com)
Leave the path empty
Redirects to:
https://example.comClick 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:
Go to cPanel → Domains → Redirects.
Scroll down to the list of Current Redirects.
Remove any duplicates or conflicting rules (use the Remove link).
Keep only one canonical rule (either www or non-www).
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:
In cPanel → Domains → Redirects, confirm the source domain and path are correct.
Confirm the destination includes the correct protocol: https:// vs http://
If you enabled Wild Card Redirect, remember it will append paths automatically:
Destination https://new.com + wildcard means /page becomes https://new.com/page
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:
Test in a private/incognito window or a different browser/device.
If you used 301, clear cache or try a new browser (301s can be “sticky”).
Confirm the source domain points to your HostBible hosting (otherwise the redirect won’t run).
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.
