What is a 301 redirect? It is a permanent, server-side instruction that sends browsers and search engines from an old URL to a new one, using the HTTP status code "301 Moved Permanently". Google treats it as a strong signal that the new URL should replace the old one in search results.
Key takeaways
- A 301 says "moved for good". A 302 says "back soon". Pick the one that matches reality, because Google reads them differently.
- Google has said 3xx redirects don't lose PageRank. The risks come from chains, loops and irrelevant destinations, not from the redirect itself.
- Keep 301s in place for at least a year (Google's John Mueller), and point your internal links at the final URL.
- Keep all your redirects in one place. Mine broke when they were scattered across theme files.
- Test every redirect with
curl -Ibefore you trust it.
How a 301 redirect works

When someone requests an old URL, the server doesn't send the page. It sends a short response with status code 301 and a Location header that holds the new address. The browser then requests that new address automatically. The visitor barely notices.
A raw response looks like this:
HTTP/2 301
location: https://example.com/new-page/
Googlebot does the same thing. According to Google's HTTP status code documentation, its crawlers follow up to 10 redirect hops by default. Any content on the redirecting URL is ignored, and the final URL's content is processed instead.
The status code itself is defined in RFC 9110, and MDN's reference page is a good plain-English summary of the browser side.
Redirect types and their SEO effect
Not every redirect sends the same message. This is how Google describes each one in Redirects and Google Search and its status code doc.
| Redirect | Meaning | How Google treats it | Use it for |
|---|---|---|---|
| 301 Moved Permanently | Permanent | Strong signal that the target should be canonical; target shown in results | Changed slugs, merged pages, domain and HTTPS moves |
| 308 Permanent Redirect | Permanent, keeps the request method | Treated the same as 301 | Permanent moves where POST requests must stay POST (APIs, forms) |
| 302 Found | Temporary | Weak signal; the source URL usually stays in results | Short-lived swaps, A/B tests, geo or login routing |
| 307 Temporary Redirect | Temporary, keeps the request method | Treated the same as 302 | Same as 302 when the method must not change |
| Meta refresh | HTML tag in the page | Instant = permanent; delayed = temporary | Only when you can't touch server config |
| JavaScript redirect | window.location in a script |
Followed only if rendering works | Last resort; Google says use it only if server-side and meta refresh aren't possible |
Two related tools often get confused with a 301:
| 301 redirect | Canonical tag | 503 status | |
|---|---|---|---|
| Visitors see | The new URL | The same page they requested | A "come back later" response |
| Old URL still loads? | No | Yes | No (temporarily) |
| Signal strength | Strong canonical signal | A hint Google can ignore | Tells Google to retry later |
If both URLs need to stay reachable, you want a canonical, which I cover in the canonical tags guide. If the site is only down for maintenance, don't redirect at all. Serve a 503 status code instead.
Does a 301 redirect hurt SEO?
No, a correctly set up 301 doesn't hurt SEO. It's the standard way to keep rankings when a URL changes.
Does a 301 pass link juice?
Yes. In July 2016 Google's Gary Illyes posted that "30x redirects don't lose PageRank anymore". You'll still see figures like "90–99% of link equity" quoted in some summaries. I'd ignore them. They come from older thinking, and Google hasn't published a percentage.
What does matter is relevance. Links pointing to an old page about red running shoes carry their value best to a page that is still about red running shoes. Send them somewhere unrelated and Google may not treat the move as a real replacement (more on that under mistakes).
Does a 301 take time to work?
For visitors, it works the moment the rule is live. For Google, it works when Googlebot recrawls the old URL and sees the 301. On a well-crawled page that can be days. On a page Google rarely visits, it can take weeks. That's the same crawl-demand problem I explain in how long Google takes to index a page. You can speed it up by requesting indexing of the new URL in Search Console and by linking to it internally.
When should you use a 301 redirect?

Use a 301 whenever a URL is gone for good and a clear replacement exists:
- You changed a slug or URL structure. I explain when that's worth doing in the guide to SEO-friendly URLs.
- You merged two thin or competing pages. A 301 from the weaker page to the stronger one is one of the main fixes for keyword cannibalization.
- You moved from HTTP to HTTPS, or between www and non-www.
- You moved to a new domain. Pair it with Search Console's Change of Address tool.
- You deleted a page that has a close substitute. If there is no close substitute, let it return 404 or 410.
"I'm changing my URL structure. Do I need a 301 for every page?"
Yes, for every URL that had traffic, links or indexing. Map each old URL to its nearest new equivalent, one-to-one. A pattern rule (for example /blog/(.*) to /$1) is fine when the slugs stay the same. Pages with no traffic, no links and no index presence can return 404, but in practice it's easier to redirect them too.
This is one section of a site migration, not the whole job. A full migration also covers sitemaps, canonicals, hreflang and Search Console settings.
"301 or 302 for a temporary sale page?"
If /shoes/ sends people to /black-friday-sale/ for two weeks and then goes back to normal, use a 302. Google keeps /shoes/ in results, which is what you want when the sale ends. A 301 tells Google to swap /shoes/ for the sale page. You'd then have to undo that after the sale.
If the sale page lives at its own permanent URL and you only link to it, you don't need a redirect at all.
How to set up a 301 redirect

Apache (.htaccess)
On Apache, redirects usually live in the .htaccess file in your site's root folder. Put your rules above the WordPress block (# BEGIN WordPress), or WordPress's own rewrite rules may catch the request first.
# Single page
Redirect 301 /old-page/ https://example.com/new-page/
# Whole domain to a new domain, keeping paths
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?old-domain\.com$ [NC]
RewriteRule ^(.*)$ https://new-domain.com/$1 [R=301,L]
Nginx
Nginx ignores .htaccess. Add rules to the server block in your site config, then reload Nginx.
# Single page
location = /old-page/ {
return 301 https://example.com/new-page/;
}
# Whole domain to a new domain, keeping paths
server {
server_name old-domain.com www.old-domain.com;
return 301 https://new-domain.com$request_uri;
}
WordPress
In WordPress you usually don't need to edit files. Three common options:
- Redirection (free plugin). It stores rules in the database, can create a 301 automatically when you change a post slug, and logs 404s.
- Yoast SEO Premium, which includes a redirect manager.
- Rank Math, which has a Redirections module.
Use one of them, not two. WordPress core also remembers changed post slugs and redirects them, but that's a safety net, not a redirect manager.
Cloudflare and hosting panels
If your site sits behind Cloudflare, you can create redirect rules at the edge, so the request never reaches your server. Many hosting panels (cPanel, hPanel and others) also have a "Redirects" screen, which usually writes to .htaccess for you. Either way, use only one layer for each URL.
Where are 301 redirects stored?
It depends on where you created them:
- Apache:
.htaccessor the main server config. - Nginx: the site's config file.
- WordPress plugins: a database table.
- CDN: the CDN's rule set.
If you don't know where a redirect is coming from, check the response headers. A server: cloudflare header or a plugin's x-redirect-by header often gives it away.
How to test a 301 redirect
Run this in a terminal:
curl -sIL https://example.com/old-page/ | grep -iE "^(HTTP|location)"
You want to see a single 301 followed by a 200 on the final URL. If you see 302, two or more 301 lines, or a URL that loops back to itself, fix the rule. Then check the new URL with Search Console's URL Inspection tool. Note that URL Inspection doesn't follow redirects, so inspect the destination, not the old URL.
What I learned fixing redirects on this site
In October 2026 I renamed several post slugs on algoblueprints.com and let the Redirection plugin create the 301s. That part went fine.
The problem was two older redirects that didn't live in the plugin. They were PHP snippets at the top of two article templates. When I moved all articles from WordPress pages to posts, those snippets were still looking up pages only. They stopped firing, and both old URLs started returning 200 again. That meant two live copies of the same article. I moved both into Redirection as normal 301 rules, set the old posts to draft, and pointed the existing rules straight at the final URL.
The lesson: keep redirects in one place. Code hidden in templates is easy to forget and easy to break.
The second lesson came from Search Console crawl stats. About 7% of Googlebot's requests over 90 days were going to old URLs that now return 301. Some of that is normal after URL changes. But each of those requests is a crawl spent on a redirect, not on a page. Update internal links, menus and sitemaps to point at the final URL. On a small site with limited crawl budget, that matters.
Common 301 redirect mistakes
Redirect chains. A → B → C → D. Google follows up to 10 hops, but every hop slows visitors down and wastes crawls. Point A straight at D, and update older rules whenever you add a new one.
Redirect loops. A → B → A. The browser gives up with "too many redirects". This usually comes from two systems fighting, such as a plugin forcing a trailing slash while the server removes it.
Redirecting everything to the homepage. In 2016 John Mueller said Google would see a 301 from all pages to the home page as soft 404s. Redirect to the closest relevant page, or let the URL 404. I cover how to spot this in the soft 404 guide.
Using a 302 for a permanent move. Google may keep showing the old URL. If you meant permanent, say 301.
Linking internally to redirected URLs. It works, but it's wasteful. Link to the final URL. This is part of good internal linking.
Leaving redirected URLs in the XML sitemap. Sitemaps should list final, indexable URLs only.
Is a 301 redirect permanent? Can it be undone?
It's permanent in meaning, not in mechanics. You can delete the rule or reverse it at any time.
Two things make reversing messy:
- Browsers cache 301s. Someone who already visited the old URL may keep being sent to the new one until their cache clears.
- Google has to recrawl and reprocess. If you reverse a redirect, expect a period where Google is catching up.
If there's a real chance you'll want the old URL back, that's a sign you need a 302.
How long should you keep 301 redirects?
As long as you reasonably can. John Mueller has said that "we recommend keeping the redirect in place for at least one year" so Google sees it several times. For domain moves, Google's Change of Address help page says to keep redirects for at least 180 days, and longer if the old URLs still get Search traffic.
My rule: if old URLs have backlinks, keep the redirects indefinitely. They cost almost nothing.
Why is my 301 redirect not working?
Check these in order:
- Cache. Browser cache, a caching plugin or a host CDN can keep serving the old response. On my host, the CDN cache had to be flushed separately from the WordPress cache plugin.
- Rule order. In
.htaccess, a rule below the WordPress block may never run. - Wrong server.
.htaccessrules do nothing on Nginx. - Trailing slash or case mismatch.
/old-pageand/old-page/are different URLs to a strict rule. - Two systems competing. A plugin rule and a server rule for the same URL can produce chains or loops.
- The page still exists. Some plugins only redirect if the old URL returns 404. If the old post is still published, it wins.
Then test again with curl -I, not your browser.
FAQ
Should I use a 301 or a 308?
For normal web pages, either works. Google treats 308 the same as 301. The difference is technical: with a 301, a browser may switch a POST request to GET, while a 308 keeps the method. Use 308 for API endpoints or form handlers. Use 301 everywhere else, since every server and plugin supports it.
How can I check if a redirect is 301 or 302 without the command line?
Open your browser's developer tools, go to the Network tab, tick "Preserve log" and load the old URL. The first request shows its status code. Free redirect-checker extensions and online header checkers show the same thing.
Do I need to ask other sites to update their backlinks after a 301?
It isn't required. The redirect carries the signal. But if you have a relationship with the site, an updated link removes a hop and protects you if the redirect is ever removed.
Does a 301 redirect slow down my site?
Each redirect adds a round trip before the real page starts loading. One hop is minor. A chain of three or four on mobile is noticeable. That's another reason to link directly to final URLs.
Can I 301 redirect a page to a different domain?
Yes. Cross-domain 301s are how domain moves work, and Google follows them the same way. For a whole-site move, also use the Change of Address tool in Search Console for the old property.
Sources
- Google Search Central: Redirects and Google Search
- Google Search Central: How HTTP status codes, and network and DNS errors affect Google Search
- Google Search Console Help: Change of Address tool
- Search Engine Roundtable: Google: Any 3xx Redirect Does Not Lose PageRank At All (Gary Illyes, July 2016)
- Search Engine Roundtable: Google: 301 Redirecting All Pages To Home Page Are Seen As Soft 404s (John Mueller, October 2016)
- Search Engine Journal: Google: Keep 301 Redirects In Place For A Year (John Mueller, December 2021)
- MDN Web Docs: 301 Moved Permanently
- IETF: RFC 9110, HTTP Semantics, section 15.4.2
Connect with Akif on LinkedIn, Instagram and Facebook.
Driven by advanced SEO expertise, deep marketing analytics, high-impact content strategy
With 2+ years of hands-on SEO experience, I specialize in holistic search strategies that don’t just rank—they drive real, measurable business growth. I’ve worked across industries including healthcare, hospitality, legal, e-commerce, and professional services, helping brands dominate their target markets. My approach bridges the gap between raw data and creative execution. Every strategy I build is rooted in rigorous market analysis, structured SEO frameworks, and tailored content ecosystems—no templates, no shortcuts. Whether you’re a single-location brand or scaling across multiple cities, I create data-driven marketing systems designed to compound results and grow with you.
Moving URLs or Migrating a Site?
Get a redirect map and migration checklist so your rankings and links come with you.
Book a Free SEO Audit →