When a web page’s address changes, users and search engines have to be taken to the right page from the old URL. If the old address is simply removed, visitors can hit a 404 error, links earned earlier can lose their function and organic traffic can suffer.
A 301 redirect is the HTTP status code that says a web page or resource has been permanently moved to another URL. When a user visits the old address, the browser is automatically sent to the new one.
For example, say the old page address is:
https://www.example.com/old-service/
When the content moves to a new address:
https://www.example.com/new-service/
a 301 permanent redirect can be applied from the old URL to the new one.
According to the HTTP standard, the 301 status code states that the resource has been permanently moved to a new URI. Google also recommends using server-side 301 or 308 redirects for permanent URL changes whenever possible.
A correctly used 301 redirect:
- Prevents users from meeting broken pages.
- Moves old URLs to new pages.
- Makes site migrations easier.
- Tells search engines about the permanent address change.
- Sends old links to the new page.
- Helps preserve the site architecture.
- Can reduce the risk of losing organic traffic.
What Do HTTP Status Codes Mean?
Common status codes are:
| Status code | Meaning | Purpose |
|---|---|---|
| 200 | OK | The page opens normally |
| 301 | Permanent redirect | The resource has been moved to a new address permanently |
| 302 | Temporary redirect | The resource is temporarily at a different address |
| 307 | Temporary redirect | A temporary redirect that keeps the request method |
| 308 | Permanent redirect | A permanent redirect that keeps the request method |
| 404 | Not found | The requested resource could not be found |
| 410 | Gone | States that the resource was removed and will not return |
| 500 | Server error | The server hit an error while processing the request |
| 503 | Service unavailable | The server cannot respond temporarily |
To learn about server-side error types, see the what is a server error article.
How Does a 301 Redirect Work?

The 301 redirect process generally goes like this:
- The user visits the old URL.
- The browser sends a request to the server.
- The server answers with
301 Moved Permanently. - The
Locationheader in the response gives the new URL. - The browser sends a request to the new URL.
- The new page opens with a
200 OKstatus code.
A sample HTTP response can look like this:
HTTP/1.1 301 Moved Permanently
Location: https://www.example.com/new-page/
Users mostly do not notice a 301 redirect. A user who clicks the old link reaches the new page within moments.
Search engine bots that crawl the old URL can also follow the redirect and discover the new address.
When Is a 301 Redirect Used?
A 301 redirect is not used only when a page is deleted. It can be applied in different situations involving a permanent URL change.
When a Page URL Changes
When a page’s permalink changes, the old address should be redirected to the new one.
For example, if:
/seo-service/
is changed to:
/seo-consulting/
a 301 redirect can be added to the old URL.
To learn about SEO-friendly address structures, see the SEF link guide.
When the Domain Changes
A business may start using a new domain because of a rebrand, a merger or another reason.
For example, if you move from:
oldbrand.com
to:
newbrand.com
every important URL on the old domain should be redirected to the matching page on the new domain.
It is not right to redirect all old pages only to the new site’s home page. Each URL should be redirected to the same or the closest matching new page whenever possible.
When Moving from HTTP to HTTPS
After an SSL certificate is installed, HTTP addresses need to be redirected to their HTTPS versions.
For example, a permanent redirect can be applied from:
http://www.example.com/service/
to:
https://www.example.com/service/
This should be applied not only to the home page but to all of the site’s URLs.
When the WWW Structure Changes
You should choose one of the site’s www and non-www versions.
For example, it is possible to redirect:
https://example.com/
to:
https://www.example.com/
The reverse can also be preferred. What matters is that all URLs open under a single standard version.
When Old Pages Are Merged
Several low-quality pieces covering similar topics can be merged into one more comprehensive page.
For example, if some of these pages:
/what-is-seo//what-does-seo-mean//how-is-seo-done/
are going to be merged into one comprehensive guide, the removed URLs can be redirected to the most relevant new content.
But pages with different search intents should not be merged just to reduce the number of pages.
When a Product or Service Page Is Permanently Replaced
If a product that is no longer offered has a direct equivalent or a new model, the old page can be redirected to the new product.
For example, if an old model product:
/phone-model-2025/
was replaced with the new model:
/phone-model-2026/
a redirect to that address can be considered.
But if the products’ features or user intents are completely different, using a 404 or 410 status code instead of a redirect may be more correct.
When the Category Structure Changes
The names and URL structure of categories on an e-commerce or content site can change.
For example, if you move from:
/electronics/phones/
to:
/mobile-phones/
the old category URL should be redirected to the new category.
On e-commerce sites, category, product and filter addresses should be evaluated together. E-commerce SEO work matters in this process.
When the Site Is Redesigned
When a website’s design or infrastructure changes, the URL structure can change too.
A redirect table should be prepared between the pages of the old site and their equivalents on the new site.
For example:
| Old URL | New URL | Action |
|---|---|---|
/services.html | /services/ | 301 |
/corporate.asp | /about/ | 301 |
/product.php?id=14 | /products/product-name/ | 301 |
/contact-form.html | /contact/ | 301 |
In a site redesign, the technical migration plan matters as much as the design. For the stages of a professional project, see the how to build a website article.
Differences Between 301, 302, 307 and 308 Redirects
Not all redirect codes mean the same thing. The status code to use should be chosen according to whether the move is permanent or temporary.
| Feature | 301 | 302 | 307 | 308 |
|---|---|---|---|---|
| Redirect type | Permanent | Temporary | Temporary | Permanent |
| Future of the old URL | Expected to be replaced by the new address | Old address keeps being used | Old address keeps being used | Expected to be replaced by the new address |
| Request method | Some clients may change it | Some clients may change it | Preserved | Preserved |
| SEO use | Permanent URL change | Temporary move | Temporary technical redirect | Permanent technical redirect |
| Common use | Very common | Very common | More technical use | Increasingly common permanent option |
In the HTTP standard, some user clients may, for historical reasons, turn a POST request into a GET request on 301 and 302 redirects. 307 can be used for temporary operations where the request method must absolutely be preserved, and 308 for permanent ones.
The Difference Between 301 and 302
A 301 redirect states that the URL change is permanent.
A 302 redirect says the user is being sent to another page temporarily.
Situations Where 301 Can Be Used
- The page’s URL has permanently changed
- The domain has permanently moved
- You moved from HTTP to HTTPS
- Old content was merged permanently with new content
- The WWW preference was permanently changed
- A permanent category structure was created
Situations Where 302 Can Be Used
- The page is under short-term maintenance
- A temporary campaign page is being used
- An A/B test is running
- The user is temporarily sent to a different regional page
- A product is unavailable for a short time
- A temporary technical change is being applied
Using 302 for a permanent change can make search engines keep the old URL in the index longer. Using 301 for a temporary change can cause the new address to replace the old URL.
The Difference Between 301 and 308
Both the 301 and 308 status codes indicate a permanent redirect.
The main difference is the preservation of the request method.
In a 301 redirect, some clients may turn a POST request into a GET request.
In a 308 redirect, the request method and body are expected to remain unchanged.
For URL changes on standard web pages, 301 is widely used. In APIs, forms and technical setups where method preservation matters, 308 can be preferred.
Google treats 301 and 308 as permanent redirect types. (Google for Developers)
The Difference Between a 301 Redirect and Canonical
A 301 redirect and a canonical tag do not do the same job.
| Criterion | 301 redirect | Canonical tag |
|---|---|---|
| Can the user open the old URL? | No, they go to the new URL | Yes, the page keeps opening |
| Is page content served? | The old URL serves no content | Both URLs can serve content |
| Main purpose | Permanent address change | Stating a preference among similar URLs |
| HTTP status code | 301 | Usually 200 |
| Use case | Moved and removed URLs | Duplicate or similar content |
| Signal strength | A permanent-move signal | A canonical preference signal |
If a page will no longer be used and will move entirely to a new address, a 301 redirect can be preferred.
If the page needs to stay open to users but you want one of several similar URLs to be marked as the main version, canonical can be used.
For detailed information on this topic, you can use the what is a canonical URL guide.
The Difference Between 301 and 404 or 410
It is not right to add a 301 redirect to every removed URL.
| Situation | Response to use |
|---|---|
| The page has a direct new equivalent | 301 |
| The page was moved temporarily to another address | 302 or 307 |
| The page cannot be found and its status is uncertain | 404 |
| The page was removed permanently | 410 |
| A similar page exists but not an exact equivalent | Decide according to content relevance |
| The only replacement for the page is the home page | Usually 404 or 410 may be more correct |
Redirecting an old product to a completely different product category or to the home page may not meet user expectations. We explained the steps for finding and fixing broken addresses in our article on how to find and fix 404 errors.
For example, if a removed “red running shoe” product has no direct equivalent, instead of redirecting all old product URLs to the home page, a redirect to the category or a genuine 404/410 response should be considered.
What Is the SEO Effect of a 301 Redirect?
A 301 redirect tells search engines that the old URL has been permanently moved to a new address. For how to prepare a redirect map in large-scale migrations, see our guide on preventing SEO loss during a website migration.
A correctly applied redirect:
- Helps the new URL be discovered.
- Can support the consolidation of link signals pointing to the old URL.
- Gets users to the right content.
- Helps update the URL in search results over time.
- Can reduce the risk of traffic loss during a site migration.
Google uses permanent redirects as a signal that the target URL should be treated as canonical. But a redirect does not guarantee that all rankings will transfer instantly and in the same way.
After a migration, it can take time for search engines to:
- Recrawl old URLs
- Process redirects
- Index new URLs
- Consolidate canonical signals
- Update search results
That is why temporary fluctuations in organic traffic and rankings can appear during a site migration.
Does a 301 Redirect Preserve Backlinks?
Other websites may have linked to the old URL.
If the URL is simply deleted, those links land on a 404 page. When a 301 redirect is applied to the relevant new page, users and search engines can reach the new URL.
But for the redirect to be effective, the new page must be related to the old content.
For example, redirecting the links of an SEO guide page to a completely unrelated social media page is not a correct approach.
For the general structure of backlinks, see the what is a backlink article.
How Long Should a 301 Redirect Be Kept?
Permanent redirects should not be removed after a short time.
Users’ saved links, backlinks on other sites and search engines’ old URL records can keep being used for a long time.
In site migration projects, it can be healthier to keep 301 redirects for as long as possible, preferably permanently.
If a redirect is removed:
- Old links can fall into 404 errors.
- Users may not reach the content.
- Search engines may lose the old-new URL relationship.
- Organic traffic can suffer.
In domain migrations, it is important to keep renewing the old domain and to keep the redirects active.
What Is a Redirect Chain?
A redirect chain is when a URL passes through more than one redirect instead of going straight to the target page.
Example:
URL A → URL B → URL C → URL D
In this structure, the user follows three redirects before reaching page D.
The right structure should be:
URL A → URL D
Redirect chains can:
- Delay page loading.
- Increase server requests.
- Waste crawl budget.
- Make it harder for some bots to reach the target page.
- Complicate technical maintenance.
- Hurt the user experience.
Although Googlebot can follow long redirect chains, Google recommends redirecting the old URL directly to the final target whenever possible. Google’s site migration documentation advises keeping chains short; ideally fewer than three, and if possible fewer than five redirects.
What Is a Redirect Loop?
A redirect loop is a technical error in which URLs redirect to each other and the user cannot reach the target page.
Example:
A → B → A
or:
A → B → C → A
In this case the browser keeps detecting redirects and never opens the page.
A redirect loop can happen for these reasons:
- Conflicting HTTP and HTTPS rules
- WWW and non-WWW versions redirecting to each other
- Wrong WordPress address settings
- Using more than one redirect plugin
- Conflicting CDN and server rules
- Wrong
.htaccessrules - Old redirects remaining in the cache
When a loop occurs, the user may see an error such as “too many redirects” in the browser.
How Is a 301 Redirect Done?
The redirect method varies with the server, infrastructure and content management system in use.
Before applying one:
- Take a site backup.
- Prepare the old and new URL list.
- Decide the redirect type.
- Use a test environment.
- Check the server configuration.
301 Redirect with Apache .htaccess
On Apache servers, a redirect can be set up using the .htaccess file.
To redirect a single page:
Redirect 301 /old-page/ https://www.example.com/new-page/
Using mod_rewrite:
RewriteEngine On
RewriteRule ^old-page/?$ https://www.example.com/new-page/ [R=301,L]
An example of redirecting from HTTP to HTTPS:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
An example of redirecting from the non-www version to the www version:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
A small typo in the .htaccess file can make the whole site unreachable. Always take a backup before changing it. For how the difference between Redirect and RedirectMatch in Apache caused a practical problem, see the article on how we fixed 380 rules.
301 Redirect with Nginx
On Nginx servers, redirects can be added to the server configuration file.
A single page redirect:
location = /old-page/ {
return 301 https://www.example.com/new-page/;
}
Redirecting from HTTP to HTTPS:
server {
listen 80;
server_name example.com www.example.com;
return 301 https://www.example.com$request_uri;
}
After changing the Nginx configuration, the settings should be tested and the service reloaded safely.
301 Redirect with PHP
A redirect can be done through PHP.
Example:
<?php
header('Location: https://www.example.com/new-page/', true, 301);
exit;
No output should be sent to the screen before HTTP headers are sent. Otherwise the redirect may not work and a “headers already sent” error can occur.
Redirects done through server configuration usually run earlier than application code and can be more efficient.
How Do You Do a 301 Redirect in WordPress?
On WordPress sites, a 301 redirect can be applied in different ways.
Using an SEO Plugin
Some WordPress SEO plugins have a redirect manager in their paid or free versions.
Through the plugin:
- Enter the old URL.
- Set the new target URL.
- Choose 301 as the redirect type.
- Save the rule.
- Test the old URL.
To compare the features of SEO plugins, see the WordPress SEO plugins article.
Using a Redirect Plugin
Plugins built only for redirects can be used.
These tools can offer:
- 301 redirects
- 404 logs
- Regex rules
- Bulk URL imports
- Redirect groups
- Access logs
When choosing a plugin, check how often it is updated, user reviews and compatibility with your WordPress version.
Editing the .htaccess File
If WordPress runs on an Apache server, redirects can be added to the .htaccess file.
But WordPress’s own rewrite rules must not be broken by accident. Custom redirect rules should be placed in the right position.
For WordPress’s general management structure, you can use the WordPress guide.
301 Redirect from cPanel
Some hosting control panels have a redirects section.
The general order of steps:
- Log in to the cPanel account.
- Open the Redirects section.
- Choose the permanent 301 option.
- Enter the source domain and URL.
- Enter the target URL.
- Set the WWW behavior.
- Save the redirect.
- Test the old URL.
The rule created by the control panel is usually added to the .htaccess file.
How Is a Domain Redirect Done?
To redirect all URLs of the old domain to the same path structure on the new domain, a general rule can be used.
Example:
oldsite.com/service/
can be redirected to:
newsite.com/service/
An Apache example:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?oldsite\.com$ [NC]
RewriteRule ^(.*)$ https://www.newsite.com/$1 [R=301,L]
But if the old and new sites’ URL structures are not the same, a general rule is not enough. A separate mapping must be prepared for each page.
How Do You Plan Bulk 301 Redirects?
On large sites, hundreds or thousands of URLs can change.
In this case, a redirect file with these fields can be prepared:
| Old URL | New URL | Status code | Content relationship | Check status |
|---|---|---|---|---|
/old-product-1/ | /new-product-1/ | 301 | Direct equivalent | Tested |
/old-category/ | /new-category/ | 301 | Direct equivalent | Tested |
/old-post/ | /current-guide/ | 301 | Content merged | Awaiting test |
/old-campaign/ | None | 410 | No equivalent | Tested |
When preparing bulk redirects:
- URLs should be normalized.
- Duplicate rules should be removed.
- Chains should be prevented.
- Loops should be checked.
- The most relevant target should be chosen.
- Bulk redirects to the home page should not be made.
- The redirect file should be tested before launch.
301 Redirects in a Site Migration
In projects with a domain or infrastructure change, the redirect plan is one of the core parts of the migration.
Before the migration:
- Current URLs should be crawled.
- Pages that receive organic traffic should be identified.
- URLs that receive backlinks should be extracted.
- New URL equivalents should be prepared.
- Redirects should be tried in a test environment.
- An XML sitemap should be prepared.
- Analytics and Search Console access should be checked.
After the migration:
- Old URLs should be tested.
- New URLs should be confirmed to return a 200 status code.
- Redirect chains should be searched for.
- The new sitemap should be submitted.
- Search Console index reports should be monitored.
- 404 errors should be checked.
- Organic traffic and rankings should be tracked.
- Internal links should be updated to the new URLs.
Adding redirects alone is not enough. Links inside the site should point directly to the new URLs.
Should Internal Links Be Updated?
Yes. Even if the old URLs redirect with a 301 to the new pages, links inside the site should be updated.
The wrong structure:
Internal link → Old URL → 301 → New URL
The right structure:
Internal link → New URL
Updating internal links:
- Reduces unnecessary redirect requests.
- Helps pages open faster.
- Makes crawling easier.
- Makes the site architecture clearer.
- Prevents redirect chains.
Menus, breadcrumb links, content links, images and canonical tags should be checked.
Should Old URLs Stay in the XML Sitemap?
Old URLs that return a 301 redirect should not be kept in the XML sitemap.
In general, the sitemap should contain URLs that:
- Return a 200 status code
- Are used as canonical
- Can be indexed
- Are meant to appear in organic search
Having old URLs in the sitemap can send search engines conflicting signals.
For correct use of the sitemap, see the sitemap guide.
How Should the Canonical Tag Be Updated?
The new page’s canonical tag should point to its own current URL.
Example:
<link rel="canonical" href="https://www.example.com/new-page/">
If the new URL’s canonical tag points to the old address, the canonical signal can conflict with the 301 redirect.
After a migration, these should be updated to the new URLs:
- Canonical tags
- Hreflang links
- Open Graph URLs
- Structured data
- XML sitemaps
- Internal links
How Do You Check a 301 Redirect?
Checking in the Browser
You can open the old URL in the browser and see whether it reaches the new address.
But the browser only shows that the redirect works. To see the real status code, a technical check is needed.
Browser Developer Tools
In the browser’s Network panel you can examine:
- The first URL
- The 301 response
- The Location header
- The final destination
- The final status code
- The number of hops in the chain
Google Search Console
With the Google Search Console URL Inspection tool, you can check how Google sees the URL.
In Search Console you can examine:
- Indexing status
- User-declared canonical
- Google-selected canonical
- Crawl date
- Redirect problems
Checking with Screaming Frog
With technical crawl tools such as Screaming Frog, you can analyze in bulk:
- 301 URLs
- Redirect chains
- Loops
- Internal redirects
- 404 pages
- Canonical errors
- Sitemap issues
301 Redirect Mistakes
Redirecting All Old URLs to the Home Page
Redirecting all different pages to the home page gives the user no meaningful equivalent.
Each old URL should be redirected to the most relevant new page whenever possible.
Redirecting to an Irrelevant Page
Choosing a target unrelated to the old content does not meet user expectations.
For example, redirecting a removed hosting guide to a social media consulting page is not right.
Using 302 Instead of 301
Using a temporary redirect for a permanent change can make search engines keep the old URL in the index.
Using 301 for a Temporary Operation
Using a permanent redirect during a short-term campaign, maintenance or test can cause the new page to replace the old URL.
Creating a Redirect Chain
If new rules are added without cleaning up old redirects, chains can form.
Creating a Redirect Loop
Conflicting rules can leave users unable to reach any page.
Not Updating Internal Links
If links inside the site point to old URLs, unnecessary redirect requests are created.
Keeping Old URLs in the Sitemap
Addresses that return 301 should be removed from the current XML sitemap.
Not Updating Canonical Tags
If the new page points to the old URL as canonical, conflicting technical signals result.
Removing the Redirect After a Short Time
Old links and search engine records can stay in use for a long time. Permanent redirects should be kept.
Using Large, Uncontrolled Regex Rules
A wrong regular expression can redirect thousands of pages to irrelevant targets.
Not Testing the Redirect
After a redirect is added, the source URL, target URL, status code and number of hops should be checked.
301 Redirect Checklist
You can check the following items in redirect work:
- Was the old and new URL list prepared?
- Was a relevant target defined for every old URL?
- Was 301, or 308 where appropriate, used for permanent changes?
- Was 302 or 307 preferred for temporary changes?
- Were all URLs not redirected to the home page?
- Does the redirect go directly to the final target?
- Is there a redirect chain?
- Is a redirect loop occurring?
- Does the target page return a 200 status code?
- Were internal links updated to the new URL?
- Are the canonical tags correct?
- Was the XML sitemap updated?
- Were hreflang links changed?
- Does structured data point to the new URL?
- Were menu and breadcrumb links updated?
- Is the old domain being kept active?
- Are Search Console reports being tracked?
- Are 404 and server logs being checked?
- Were mobile and desktop versions tested?
- Was a backup of the redirects taken?
Frequently Asked Questions About 301 Redirects
What is a 301 redirect?
A 301 redirect is the HTTP status code stating that a web page or resource has been permanently moved to a new URL.
Does a 301 redirect hurt SEO?
A 301 redirect applied to correct and relevant targets generally helps manage site migrations and URL changes in a healthy way. Wrong, irrelevant or chain-forming redirects can cause problems.
Does a 301 redirect pass backlinks?
A permanent redirect lets users and search engines arriving at the old URL reach the new page. It is important that the new page is relevant to the old content.
How long does a 301 redirect take to take effect?
The redirect works for users immediately. How long it takes search engines to process the old-new URL relationship depends on crawl frequency and site size.
How long should a 301 redirect be kept?
For permanent URL changes, the redirect should be kept for as long as possible, preferably permanently.
What is the difference between 301 and 302?
301 is a permanent redirect and 302 a temporary one. Use 301 if the URL change is permanent and 302 if it is short-term.
What is the difference between 301 and 308?
Both are permanent. A 308 redirect ensures the HTTP request method is not changed during the redirect.
Should every deleted page get a 301?
No. If the page has no relevant equivalent, 404 or, for permanent removal, 410 may be more suitable.
Can you 301 to the home page?
It can be done if the old page’s direct equivalent is the home page. But redirecting all removed URLs in bulk to the home page is not recommended.
How do you do a 301 redirect in WordPress?
You can use an SEO plugin, a dedicated redirect plugin, .htaccess, the hosting panel or the server configuration.
What is a redirect chain?
It is when a URL passes through more than one redirect before reaching the final target. You should redirect directly to the final target whenever possible.
Does a 301 redirect affect page speed?
Every redirect creates an additional HTTP request. A single redirect usually has a limited effect, while long chains can delay page loading.
Can 301 be used instead of canonical?
The two methods serve different purposes. If a page is moving completely, use 301; if both URLs will stay open and a preferred version will be stated, consider canonical.
Does a 301 redirect show up in Search Console?
Information about redirected URLs can be seen in Search Console’s URL Inspection and indexing reports.
What happens if a 301 redirect is removed?
Old URLs can fall into 404 errors, users may not reach the content and search engines’ old-new URL relationship can be affected.
A 301 redirect is the HTTP status code stating that a page or web resource has been permanently moved to a new URL.
When used correctly, it:
- Gets users to the new page.
- Preserves the function of old URLs.
- Supports site migration processes.
- Can prevent backlinks from going to waste.
- Tells search engines about the permanent address change.
- Helps reduce 404 errors.
In successful redirect work, old URLs should be redirected to the most relevant new pages, chains and loops should be avoided, internal links should be updated and old addresses should be removed from the XML sitemap.
301 redirects, canonical, robots and indexing settings should be evaluated together. In large site migrations, it matters not only that redirects work but that they reach the right targets in terms of SEO signals and user experience.
To identify redirect chains, 404 pages, canonical issues and indexing errors on your site, you can get an SEO analysis.
To manage your technical infrastructure, site migration and organic visibility work professionally, you can benefit from the technical SEO guide and our SEO consulting service.





