What Is 301 Redirect? SEO, HTTP, and Checks
Learn what is 301 redirect, how it works at the HTTP level, when to use it, and how to test it for SEO without chains or loops.
A 301 redirect is a permanent HTTP status code that tells browsers and search engines a URL has moved to a new location. The server returns 301 with a Location header pointing to the destination. It helps preserve signals during moves, but it must be tested for chains, loops, and broken targets.


what is 301 redirect at the HTTP level#
A 301 is an HTTP status code in the 3xx redirection class. It means the requested resource has been assigned a new permanent URI. The HTTP Semantics specification from the RFC Editor documentation for status code 301 defines that response behavior.
In practice, the server answers the old URL with 301 Moved Permanently and sends a Location header containing the new URL. The browser or crawler then requests the destination URL. That is why a redirect is not a page-level design trick. It is part of the server response cycle.
This matters for debugging. If the server does not actually return 301, then the redirect is not a true permanent redirect even if a plugin or CMS says it is. YepAPI's On-Page Instant API is the fast way to validate response behavior in code across many URLs, not one browser tab at a time.
When to use a 301 redirect#
Use a 301 redirect when the move is intended to be permanent. Common cases include a page slug change, a site migration, a domain change, a canonical consolidation, or an HTTP-to-HTTPS migration.
A 301 is also appropriate when you merge duplicate or overlapping pages into a stronger destination. If an old page has useful backlinks or traffic, redirecting it to the closest relevant replacement helps users land in the right place. During larger migrations, YepAPI's On-Page Content API can help you compare old and new pages so redirects map to the best destination.
Do not use a 301 when the change is temporary. Do not redirect unrelated deleted pages to the homepage. Google has warned in Search Central that soft 404 patterns can confuse indexing and quality evaluation, as explained in Google Search Central's guidance on soft 404 errors.
how do 301 redirects affect SEO#
301 redirects help search engines discover the replacement URL. They also help consolidate ranking signals when an old URL is retired and a relevant new URL replaces it.
Google has said redirects can pass signals, but implementation quality still matters. A bad redirect map can waste crawl budget, slow users, and make internal linking harder to maintain. That is why technical audits should check the final status code, the destination URL, and the number of hops.
Three SEO effects matter most:
- Signal consolidation. A good 301 helps Google associate the old URL with the replacement.
- Crawl efficiency. Extra hops force crawlers to spend more requests reaching the final page.
- User experience. Long redirect paths make navigation slower, especially on mobile or weak connections.
If you need to audit redirected pages beside broader technical issues, YepAPI's SEO API gives you the general technical toolkit, while the On-Page Instant API is the direct endpoint for checking page-level status and redirect behavior.
301 vs 302 redirect#
A 301 redirect signals a permanent move. A 302 redirect signals a temporary move. That is the core distinction.
If the move is permanent, use 301. If the move is temporary, such as short-term testing or a limited campaign page, use 302 instead. The exact implementation details are covered more deeply in 301 redirect vs 302.
| Redirect | Meaning | Typical use |
|---|---|---|
| 301 | Permanent move | URL changes, migrations, consolidation |
| 302 | Temporary move | Short-term tests, temporary substitutions |
The mistake is not just choosing the wrong code once. The bigger problem is leaving temporary redirects in place for months, or using permanent redirects for content that should return later.
how to set up a 301 redirect#
The exact method depends on your stack. The rule is simple: configure the old URL to return HTTP 301 and point its Location header to the correct new URL.
Here is a concise implementation matrix.
| Environment | Typical method | Best for |
|---|---|---|
| Apache | .htaccess or server config | Single-site or legacy server setups |
| Nginx | return 301 or rewrite rules | High-performance server configs |
| WordPress | Redirect plugin or host rules | Editors who avoid server files |
| Site migration | Server rules plus redirect map | Domain, structure, or HTTPS moves |
For WordPress, a plugin can be practical when non-developers manage content. For Apache and Nginx, server-level rules are usually cleaner and more predictable. If you are reviewing platform-wide issues after setup, YepAPI's On-Page Lighthouse API can complement redirect checks with broader page health signals.
301 redirect plugin for WordPress#
A WordPress redirect plugin is useful when you need a simple interface and audit trail for editors. It is less ideal when complex rules should live in version-controlled infrastructure.
The important point is verification. A plugin UI may say a redirect exists, but the only reliable test is the live response from the old URL. YepAPI's On-Page Instant API is the straightforward way to check those responses in bulk after publishing.
How to test and validate a 301 redirect#
This is the step most articles skip. After implementation, verify the behavior from the old URL to the final destination.
Use this checklist:
- Request the old URL.
- Confirm the response code is exactly
301. - Confirm the
Locationheader points to the intended destination. - Request the destination URL.
- Confirm the destination returns
200 OKand loads the expected canonical page. - Check that the path does not create a chain or loop.
You can test one URL with command-line tools. The curl documentation for following redirects explains how to inspect redirect behavior from the terminal.
For teams, one-off testing is not enough. If you are changing hundreds of URLs, audit them programmatically. YepAPI's On-Page Instant API lets you validate status codes at scale, and YepAPI's Web Scraping API can help capture final-page output when you need to confirm what users actually receive after a redirect.
Redirect chains, loops, and hop limits#
A redirect chain happens when URL A redirects to B, then B redirects to C. A redirect loop happens when the path never resolves because one redirect points back into the chain.
Both are bad operationally. Chains add latency and make migrations harder to maintain. Loops break access altogether.
A simple example looks like this:
/old-page→/older-page/older-page→/new-page
That works, but it is still worse than redirecting /old-page straight to /new-page. Clean the chain whenever you can.
At scale, the problem is visibility. Manual spot checks miss edge cases. That is why teams use automated checks during releases and migrations. YepAPI's On-Page Instant API can be used to flag non-200 final URLs, while YepAPI's Domain Overview API gives the wider domain context for large technical audits.
When not to use a 301 redirect#
Do not use a 301 just to avoid handling a real content decision. If a page should remain temporary, use the appropriate temporary redirect. If content is gone with no replacement, serving an honest 404 can be better than forcing users to an irrelevant page.
Do not mass-redirect every deleted URL to the homepage. Do not redirect pages to loosely related destinations just because they have traffic. Those patterns create poor user journeys and muddle Google Search signals.
This is one reason redirect work belongs inside broader technical maintenance. The practical checklist in technical SEO best practices fits naturally with redirect auditing, canonical URL review, and broken-link cleanup.
Audit 301 redirects at scale with YepAPI#
The missing practical layer is scale. A developer can test one redirect with a browser or curl, but a migration often means hundreds or thousands of URLs.
YepAPI's On-Page Instant API is the fastest way to check whether old URLs return 301, whether targets resolve correctly, and whether redirect paths create audit issues. Pair it with the Domain Overview API when you need domain-wide context and with the Web Scraping API when you want to inspect the rendered destination response.
That workflow is useful during HTTPS migrations, slug changes, CMS moves, and redirect cleanup projects. It turns redirect checking from a manual spot-check into a repeatable QA step.
CTA#
Need to verify redirects in code instead of checking them one by one? Use YepAPI's On-Page Instant API to audit status codes, redirect targets, and final-page behavior at scale. Get $5 free credit, no card required.
FAQ#
Why is my URL being redirected?#
A URL is usually redirected because the page moved, the site changed domains, HTTPS replaced HTTP, or duplicate URLs were consolidated to a preferred canonical destination. Sometimes redirects are also caused by CMS rules, plugins, server configuration, or cached rewrite logic. The fix is to inspect the live HTTP response and follow every hop.
What is the difference between a 301 and 302 redirect?#
A 301 redirect signals that the move is permanent, while a 302 redirect signals that the move is temporary. Search engines use that difference to interpret how long the change is expected to last. If a page has moved for good, use 301. If you expect the original URL to return soon, use 302.
Is there a 301 redirect plugin for WordPress?#
Yes. Several WordPress plugins let you create and manage 301 redirects without editing server files. They are useful for editorial teams and simple site changes. The important part is not the plugin itself but validation: confirm the old URL returns HTTP 301, the destination resolves correctly, and no redirect chain was created.
What does 301 mean?#
301 is an HTTP status code meaning “Moved Permanently.” It tells a browser or crawler that the requested URL has a permanent new location, usually provided in the response’s Location header. After receiving that response, the client requests the destination URL instead of rendering the original one. That is why 301 redirects are handled at the protocol level.
Topics