Skip to content
Enjoy 20% off for 12 months on all plans. Use promo code: HYPERGROWTHClaim it

How to Do a 301 Redirect Without Losing Your Rankings

By Toy Wen Da, Co-Founder · Updated · 9 min read · scored 92/100

A 301 redirect permanently sends visitors and search engines from an old URL to a new one. To set one up, change a setting in your hosting panel, CMS or .htaccess file so the old URL points at its replacement. If the new page is a good match for the old one, most of the old page's ranking value carries over.

Flat illustration of a source webpage with ranking indicators flowing left to right via arrow to a destination webpage, maintaining equal authority.

Before you change anything, run the old URL through the free Redirect Checker. It shows the current status code, whether a redirect already exists, and how many hops it takes to reach the final page. You'll know right away whether you're starting clean or untangling a mess someone else left behind.

What a 301 redirect actually does

When someone requests a page that has moved, the browser or crawler gets an HTTP status code from your server before any content loads. A 301 means "moved permanently": the old address is retired and everything should point to the new one from now on.

Visitors benefit because they land on something useful instead of a dead page. Search engines benefit because they swap the old URL for the new one in their index and carry over most of the ranking signals the old page had earned. Without the redirect, visitors hit a 404 and search engines eventually drop the old URL with nothing to replace it.

301 vs. 302 vs. 404: which one do you need?

Status Meaning When to use it Effect on rankings
301 Moved permanently Page deleted, merged, or moved to a new URL for good Passes most ranking signals to the new URL
302 Moved temporarily A/B test, seasonal page, short-term maintenance Search engines keep the original URL indexed
404 Not found Content removed with no suitable replacement page No ranking signal passed; a clean dead end

Picking the wrong one is a common slip. A 302 left in place for months tells search engines the move might be temporary, so they hold off fully transferring value to the new page. If the old page has nothing sensible to replace it, a 404 is the honest answer, and forcing a redirect to an unrelated page just to avoid one helps nobody.

When you need a 301 redirect

A 301 earns its place any time an old address stops working but the content still matters. The usual triggers:

  • Deleting or merging pages, such as combining two similar articles and sending both old URLs to the survivor.
  • Changing a URL structure by turning long, dynamic URLs into shorter, readable ones.
  • Moving to a new domain, where every old-domain URL points to its equivalent on the new one.
  • Switching from HTTP to HTTPS, a site-wide move that needs a 301 on every page.
  • Redesigning a site when the rebuild changes folder structure or page names across the board.

If you're planning a redesign or a domain move, map your current URLs against your target keywords first so nothing important gets redirected to the wrong page by accident. A fresh keyword research process before a migration makes that mapping far less error-prone.

How to do a 301 redirect on your own site

The screen you'll use depends on how your site is built. Here are the three most common setups.

Using a .htaccess file (Apache servers)

Most traditional hosting runs on Apache, which reads a plain text file called .htaccess in your site's root folder. To redirect this way:

  1. Connect to your site's files through your host's file manager or an FTP client.
  2. Open the .htaccess file in a plain-text editor, and create one if it doesn't exist.
  3. Add a line in this format: redirect 301 /old-page.html https://www.example.com/new-page
  4. Save the file and reload the old URL in a browser to confirm it lands on the new page.

Each old URL needs its own line. Past a handful of pages, a one-off .htaccess edit gets impractical fast, as the scale section below explains.

Using WordPress

On WordPress you don't need to touch code. Install a redirect plugin from the Plugins menu, then find the screen with one field for the old URL and another for the destination. Save the rule and the plugin handles the server response for you. Most of these plugins also log 404 errors, which shows you which broken links need a redirect before you create one.

Using a website builder or host control panel

Platforms like Shopify and Wix offer a redirects section inside their own dashboard, separate from the page editor, and so do Squarespace and hosts such as GoDaddy. The pattern is the same across them: open the domain or URL management area, find a redirects or forwarding option, and enter the old path and new path as a pair. Menu wording shifts between providers and over time, so look for the redirects section in your current dashboard instead of a specific label.

Diagram of an old URL mapped to a new URL in a redirect rule

When your site's own tools are enough, and when they're not

It depends on scale and on how often this comes up.

A single page that moved, or one old blog post merged into a newer one, is a textbook DIY job. Open your CMS or .htaccess file, add one rule, confirm it works, and you're done in about five minutes.

A full domain migration, a rebuild that changes every URL, or an e-commerce catalog with hundreds of product pages is a different problem. At that scale a single missed redirect can mean a page quietly vanishes from search results. You need a full list of old URLs crossed against their new destinations, built before the change goes live and not patched together afterward from memory.

Recurring breakage deserves a mention too. If your team runs into broken links every time you publish or restructure content, you have a process gap and a one-off fix won't close it. Teams without a dedicated SEO hire often underestimate how much ongoing redirect upkeep a growing site needs, and a structured SEO plan built for a small marketing team usually folds this into the routine so each migration stops being a fire drill.

Common 301 redirect mistakes

Most redirect problems come from a handful of repeat offenders.

Mistake What happens The fix
Redirecting everything to the homepage Visitors land somewhere irrelevant; search engines see little topical match Redirect each old page to its closest live equivalent instead of using a blanket homepage redirect
Redirect chains Page A points to B, which points to C; each extra hop can dilute link value and slows the page Update every old redirect to point straight at the final URL
Redirect loops Page A points to B, which points back to A, trapping visitors Trace the chain and fix the rule that loops back
Leaving a 302 in place long-term Search engines treat the move as temporary and delay transferring ranking signals Switch it to a 301 once the move is confirmed permanent
Forgetting internal links Old URLs still get clicked from your own site's menus and posts Point internal links directly at the new URL so they skip the redirect entirely

Redirect chains build up quietly, because every site rebuild or URL cleanup adds a layer if old rules aren't flattened. Review your redirect list whenever you change the site's structure, and again after launch.

How to verify your 301 redirect worked

Once the redirect is live, don't trust the browser alone. Some setups show the new content while returning the wrong status code underneath, and search engines read that code differently than you do. Run the URL through the Redirect Checker again to confirm a clean 301 with no extra hops. If you manage many redirects, keep a simple log of what points where so the next person editing the site, or future you, isn't left guessing.

Tracking pays off here as well. If a redirected page's traffic doesn't recover within a reasonable window, you want to catch it in your regular SEO tracking and not months later in a traffic report nobody read closely.

FAQs

How long does it take for a 301 redirect to work?

The redirect itself works the moment it's saved. Search engines take longer to process the change, sometimes days and sometimes a few months, as they re-crawl the old URL and replace it with the new one in their index.

Does a 301 redirect hurt my SEO?

No, when it's set up correctly. A 301 is the standard way to preserve ranking value when a page moves, and it's generally considered safer for SEO than leaving a dead link or using a temporary 302.

What's the difference between a 301 redirect and a canonical tag?

A 301 sends visitors and search engines to a different URL, and the old one stops serving its own content. A canonical tag keeps both URLs live but tells search engines which version to treat as primary for indexing, which suits near-duplicate pages better than pages that are actually gone.

Can I do a 301 redirect without a plugin or code?

Yes, if your host or website builder has a built-in redirects section in its dashboard. That covers most GoDaddy, Shopify, Wix and Squarespace sites without a line of code.

How many redirects are too many?

There's no fixed number, but each extra hop in a chain adds load time and a small risk that link value doesn't fully transfer. Aim for a direct path from the old URL to the current one with no intermediate stops.

Talk to the team before your next migration

Redirecting one page is simple. Getting every page right across a full site move, without losing the rankings they already earned, is where most teams want a second set of eyes, especially if you also have to explain the change to stakeholders who want a clear before-and-after. If you'd like your redirect mapping, traffic impact and SEO plan reviewed before you flip the switch, talk to the team and walk through a sample report built around your own site.

Related reading: WordPress 301 Redirect: Fix a Broken Link in 3 Steps.

Related reading: Shopify 301 Redirect: The 5-Minute Fix for a Broken Link.

Related reading: Wix 301 Redirect: Fix a Broken Link in Under 5 Minutes.

See what this looks like on your own siteEnter your website. You get the searches your buyers make and the page that should answer each one.

Sources

About the author

SearchBlueprint researched, wrote and scored this article with the content pipeline our customers run on their own sites. The score in the byline is what our content engine gave this page before it published. Nothing here is reviewed by hand, which is the point: it is the product's output, published where anyone can check it.