Skip to main content

Site Management

Setting Up a 301 Redirect the Right Way

Permanent moves, temporary swaps, and whole-domain forwarding each need a different redirect type — here's how to set up all three correctly.

301

Status code for a permanent redirect

3

Setup methods covered here

NVMe

SSD + LiteSpeed keeping redirected pages fast

24/7

Human support for .htaccess or DNS issues

In short

A 301 redirect permanently sends visitors and search engines from an old URL to a new one, passing along most of the original page's SEO value — use it whenever a page or domain has moved for good. You can create one through cPanel's Redirects tool with no code, by adding a rule to .htaccess for more control, or via full-domain forwarding when an entire domain should point elsewhere.

A 302 or 307 redirect signals a temporary move instead, telling search engines to keep indexing the original URL rather than replacing it — use those only when the change genuinely isn't permanent, such as a page swapped out during a sale.

Redirects come up constantly: a blog post gets a cleaner URL, a whole site migrates to a new domain, an old product page needs to send visitors somewhere still relevant, or a temporary maintenance page needs to stand in for a few hours. Picking the wrong redirect type is a common and costly mistake — a permanent move set up as temporary, or the reverse, can quietly cost a page its search rankings or leave search engines indexing content that no longer exists.

The status code is what actually matters, not the tool used to create it: 301 means permanent, 302 and 307 mean temporary, and every method below — cPanel's point-and-click Redirects tool, a manual .htaccess rule, or full-domain forwarding at the registrar or hosting level — is just a different way of setting the same underlying instruction.

301 vs 302 vs 307: Picking the Right Code

A 301 tells browsers and search engines the move is permanent — the old URL should be dropped from search results in favor of the new one, and most of the original page's ranking signals transfer over time. Use a 301 for a retired page replaced by a new one, a full domain migration, adding or removing 'www' consistently, or switching from HTTP to HTTPS.

A 302, or the stricter 307 which preserves the original request method, tells search engines the move is temporary — keep the old URL indexed, this is just a stand-in for now. Use one of these for a seasonal landing page, an A/B test variant, or a maintenance page standing in while the real page is being worked on; using a 301 in these cases risks search engines dropping the original URL even though it's coming back.

Method 1: cPanel's Redirects Tool

For straightforward page-to-page or domain-to-domain redirects, cPanel's Redirects tool needs no code: choose the domain, enter the path being redirected from, enter the full destination URL, choose Permanent (301) or Temporary (302), and save. cPanel writes the underlying .htaccess rule automatically, which is the fastest route for a handful of redirects without editing a file directly.

This method covers the majority of everyday redirect needs — a moved page, a renamed category, a domain-wide redirect — and is the right starting point for anyone not comfortable editing .htaccess by hand. It's also easy to review and remove later, since every redirect created this way is listed in one place inside the panel.

Method 2: Adding Rules Directly to .htaccess

For bulk redirects, pattern-based rules, or conditions cPanel's simple tool can't express, such as redirecting an entire folder structure, edit .htaccess directly using mod_rewrite. A basic single-page 301 looks like Redirect 301 /old-page /new-page, while a pattern-based rule uses RewriteRule for more complex matching, such as redirecting every URL under an old category to a new one in a single line.

A syntax mistake in .htaccess can take the whole site offline instantly, so back up the current file before editing it and test the change immediately after saving, ideally on a couple of different URLs covered by the rule. Daily backups make this safe to experiment with, since a broken .htaccess is one of the fastest things to restore from a recent backup if a rule doesn't behave as expected.

Method 3: Full-Domain Forwarding

When an entire domain, not just individual pages, needs to point somewhere else, full-domain forwarding at the registrar or hosting DNS level redirects every request for that domain to a destination URL, usually with the option to mask the original domain or forward it transparently. This suits a domain you're keeping registered for branding or backup purposes but no longer actively hosting a separate site on.

The tradeoff is precision: domain forwarding typically sends every path to the same destination or a simple pattern, rather than mapping specific old URLs to specific new ones the way individual redirect rules can. For a real migration where individual page URLs matter for SEO, page-level 301s via cPanel or .htaccess preserve more value than a blanket domain forward alone.

How to Set Up a 301 Redirect (URL & Domain)

Redirect Without Losing the SEO Value You've Built

A correctly typed redirect is what separates 'the new page ranks where the old one did' from 'the old page's rankings just disappeared' after a move.

Hosting Cheap's cPanel-style panel includes a point-and-click Redirects tool plus full .htaccess access, so both simple and pattern-based redirects are straightforward to set up.

  • Point-and-click Redirects tool in cPanel
  • Full .htaccess access for pattern-based rules
  • Daily backups before testing riskier rewrite rules
  • 24/7 human support if a redirect misbehaves

Why Hosting Cheap

What you get

Point-and-click Redirects tool

Set up standard 301 or 302 redirects in cPanel without writing any code.

Full .htaccess access

Add pattern-based mod_rewrite rules for bulk or conditional redirects when the simple tool isn't enough.

Daily backups

Test riskier .htaccess changes with a recent restore point always available if a rule breaks the site.

NVMe SSD + LiteSpeed

Redirected pages and their destinations both load quickly, keeping visitors from noticing the hop.

Free SSL included

Redirects between HTTP and HTTPS, or across domains, work cleanly with SSL already covering every hostname.

24/7 human support

Get help if an .htaccess rule causes an error or a redirect doesn't behave as expected.

How It Works

Get set up in a few steps

1

Choose the right status code

Decide whether the move is permanent (301) or temporary (302/307) before setting anything up.

2

Create the redirect

Use cPanel's Redirects tool for simple cases, .htaccess rules for bulk or pattern-based moves, or domain forwarding for a whole domain.

3

Test and monitor the result

Check the redirect lands on the correct destination and watch for any pages still linking to the old URL.

Included

Everything you need, on every plan

  • Correct status code chosen: 301 for permanent, 302/307 for temporary
  • Old URL and new destination URL both double-checked for typos
  • cPanel's Redirects tool used for simple, one-off redirects
  • A .htaccess backup taken before adding any manual rewrite rules
  • Pattern-based rules tested on more than one matching URL
  • Internal links updated to point directly at the new URL where possible
  • Redirect chains avoided by pointing straight to the final destination
  • HTTPS and www consistency checked across the redirected domain

FAQ

Frequently asked questions

How do I set up a 301 redirect in cPanel?

Open the Redirects tool in cPanel, choose the domain, enter the old path, enter the full new destination URL, select Permanent (301), and save. cPanel writes the .htaccess rule automatically, so no manual file editing is needed for straightforward redirects.

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

A 301 tells search engines the move is permanent and the old URL should be replaced in search results by the new one. A 302 (or 307) signals a temporary move, so the original URL stays indexed as the primary version while the redirect is active.

How do I redirect an entire domain to a new one?

Use full-domain forwarding at the registrar or hosting DNS level for a blanket redirect of every request, or set up individual 301 rules for each important URL if preserving specific page rankings matters. For a real site migration, page-level 301s generally protect SEO value better than domain forwarding alone.

Will a 301 redirect hurt my SEO rankings?

A properly set up 301 typically passes along most of the original page's ranking signals over time, which is why it's the recommended code for permanent moves. Using the wrong code, such as a 302 for something actually permanent, is more likely to hurt rankings than a 301 itself.

How do I write a redirect rule in .htaccess?

A basic single-page redirect uses the format Redirect 301 /old-page /new-page. For pattern-based redirects across multiple URLs, a RewriteRule with mod_rewrite conditions handles more complex matching, though it's worth backing up .htaccess first since a syntax error can affect the whole site.

Can I create a temporary redirect for a maintenance page?

Yes, a 302 or 307 redirect is the right choice for a maintenance page or any other short-term stand-in, since it keeps the original URL indexed for when it returns. Using a 301 for a maintenance page risks search engines treating the change as permanent.

Ready to Redirect Without Losing Rankings?

Get cPanel-style hosting with a built-in Redirects tool, from $2.09/mo.

Get Started