Short answer: 301 redirect is an HTTP status code that tells browsers and search engines that a page has permanently moved to a new address. A visitor coming to the old address is automatically sent to the new address; Google also uses this as a strong signal that the new address should be shown in search results. 301 and 308 are permanent, while 302 and 307 are temporary redirect codes; the most common choice for content pages is 301.

A 301 redirect is an HTTP status code that tells browsers and search engines a page has permanently moved to a new address. A visitor arriving at the old address is automatically sent to the new one; Google also uses this permanent redirect as a strong signal that the new address should be displayed in search results.

This guide first explains the differences between redirect types based on Google Search Central documentation: 301, 302, 307, and 308 codes, meta refresh, and JavaScript redirects. It then moves on to implementation: redirect chains, address mapping plans for website migration, redirect methods in WordPress, a general .htaccess example, testing methods, and the most common mistakes.

What is a 301 redirect?: a 62-second video explanation
Video transcript

What is a three hundred and one redirect? It is a status code indicating that a page has permanently moved to a new address; the visitor is sent to the new address, and Google treats it as a strong signal. When the domain name changes, the same page can be reached through multiple addresses, two websites merge, or the address structure changes during a redesign, the old address is permanently redirected to the new one. Three hundred and one and three hundred and eight are permanent, while three hundred and two and three hundred and seven are temporary. For content pages, three hundred and one is the most common choice. First, a list of old addresses is compiled, and each is mapped to the closest new address. Pages without an equivalent return four hundred and four or four hundred and ten; internal links and the sitemap are updated. Sending all old addresses to the homepage, using three hundred and two for a permanent change, creating chains, and removing redirects after a few months are the most common mistakes. Tests are performed in a private window. WordPress methods and official documentation are on the page. You can write through WhatsApp for a plan before migration. Onur Freelance dot com.

What does a 301 redirect do?

When an address changes, a 301 redirect moves both the visitor and the search engine to the new address and ensures that links earned by the old address are not wasted. Without a permanent redirect, the old address returns a 404 error; websites linking to the old address, bookmarks, and the entry in search results become unusable.

Google’s documentation on redirects and Google Search lists the situations in which redirects are especially useful: when a website moves to a new domain, when the same page can be reached through multiple addresses (such as http and https or www and non-www versions), when two websites merge, and when a page is removed and replaced by a new page. On corporate websites, the most common scenario is a change in URL structure during a redesign; when a service page’s address changes from /hizmetlerimiz/seo.html to /seo-hizmeti/, the old address must be permanently redirected to the new one.

What is the difference between 301, 302, 307, and 308?

301 and 308 are permanent redirect codes, while 302 and 307 are temporary; permanent redirects lead to the new address being displayed in search results, while temporary redirects preserve the old address. According to Google’s HTTP status codes documentation, Google processes 301 and 308 in the same way, and likewise 302 and 307; however, because these codes carry different meanings, the code appropriate to the situation should be chosen so that other browsers and clients behave correctly.

CodeMeaningTypical use
301 Moved PermanentlyMoved permanentlyURL changes, domain migration, consolidating https and www versions
308 Permanent RedirectMoved permanently; the request method is not changedPermanent moves involving POST requests, such as form and API addresses
302 FoundTemporarily elsewhereA short-term campaign or maintenance page
307 Temporary RedirectTemporary; the request method is not changedSituations where a form submission must be preserved during a temporary redirect

The distinction for 307 and 308 is defined in the HTTP standard (RFC 9110): with these two codes, the browser must repeat the request to the new address without changing its method; with 301 and 302, a POST request is allowed to become GET for historical reasons. This difference is not noticeable in ordinary page moves; this is why 301 is the most common choice for content pages.

How does Google interpret permanent and temporary redirects?

Google uses a permanent redirect as a strong signal that the redirect destination should be the canonical address, and a temporary redirect as a weak signal. With a temporary redirect, the source address generally remains in results; the destination page may still be indexed if other canonicalization signals exist.

How the redirect is implemented also matters. Google’s documentation ranks methods by the likelihood of Google interpreting them correctly and identifies server-side redirection as the most reliable method. If server-side redirection is not possible, meta refresh is an alternative: a meta refresh that runs as soon as the page loads (0 seconds) is interpreted as permanent, while a delayed one is interpreted as temporary. JavaScript redirection should be used only if the other two methods are impossible.

This also provides the practical meaning of a 301 redirect: a permanent bridge transferring the value of the old address to the new one when an address changes. The code is chosen according to whether the change will be reversed. If the address changes permanently, use 301 or 308; if visitors are sent to an information page for a few days because a service is temporarily suspended, 302 or 307 is appropriate. Using a temporary code for a permanent change can cause the old address to remain in search results for a long time.

Page contents

Trustworthy web agency: handshaking client and team, trust shield illustration

What is a redirect chain, and why should it be avoided?

A redirect chain means an address redirects first to another address and then to another, rather than directly to the final destination; for example, page A redirects to B and B to C. Chains usually form when successive migrations are layered on top of one another: first from http to https, then from the old URL structure to the new one, and then a domain change.

According to Google’s website migration guide , although Googlebot can follow up to 10 hops in a chain, redirecting directly to the final destination is recommended; if this is impossible, the chain should be kept short. Chains mean additional delay for visitors, and not every browser or user agent supports long chains. A redirect loop, where an address eventually returns to itself, makes the page completely inaccessible.

The way to break a chain is to review and update old redirect rules with every new migration; this is often forgotten unless listed as a separate item on the migration checklist: the old rule from A to B is rewritten after migration to go directly from A to C. Internal website links should also point to final addresses rather than addresses that redirect.

How do you plan 301 redirects during website migration?

The foundation of 301 redirection during website migration is a URL mapping table showing the corresponding new address for every old address. Google’s website migration documentation recommends server-side permanent redirects from old addresses to their corresponding new addresses and describes the process through the following steps:

  1. Compile the old website’s address list; existing sitemaps, Search Console reports, and analytics data are the sources for this list.
  2. Identify the new address with the closest content for each old address and enter it in the mapping table.
  3. Return a 404 or 410 response on the new website for deleted content with no equivalent.
  4. Update internal links, canonical tags, and the sitemap on the new website to use the new addresses.
  5. Put the redirects live; if the domain has changed, also notify Google through Search Console’s Change of Address tool.
  6. Submit the new sitemap and monitor indexing status through Search Console.

Two warnings in the documentation are especially important. First, redirecting numerous old addresses to a single unrelated destination, such as the new website’s homepage, confuses visitors and may be treated as a soft 404. Second, redirects should be maintained for as long as possible, generally at least one year. When a redesign requires a URL change is one of the subjects covered in the corporate website redesign guide.

Let’s prepare your migration plan together

For a website whose domain or URL structure will change, we can start compiling the old address list, preparing the mapping table, and checking existing redirects for chains through a free preliminary assessment; simply send the website address through WhatsApp.

Which methods can be used for 301 redirects in WordPress?

In WordPress, 301 redirects can be implemented through a redirect plugin, an SEO plugin’s redirect module, a server configuration file, or theme or plugin code. The choice depends on the number of redirects, the server type, and who manages the website.

  • WordPress’s own behavior: when a post’s slug is changed, WordPress records the old slug and attempts to redirect visitors arriving at the old address to the new permalink. This is a safety net for individual post addresses but does not replace a comprehensive migration plan.
  • Redirect plugin: a rule is added by entering the source and destination addresses in the dashboard; most plugins also keep 404 logs. This is practical for a small number of redirects and nontechnical administrators.
  • The SEO plugin’s redirect module: if the website already has an SEO plugin, it may do the same job without installing an additional plugin.
  • .htaccess or server configuration: .htaccess is used on Apache and LiteSpeed servers, while server configuration is used on Nginx servers. Because the redirect runs before WordPress loads, it is the fastest method and is preferred for large migrations.
  • Through code: developers can use the wp_safe_redirect or wp_redirect functions. The default status code in these functions is 302; 301 must be specified explicitly for a permanent redirect.

Whichever method is chosen, keeping the rules in a single place is important. Having a rule for the same address in both a plugin and .htaccess produces unexpected chains and loops; where the rules are stored should be documented in a short note for whoever takes over the website later. Situations such as redirects stopping after a plugin or theme change can be investigated through WordPress troubleshooting services.

Transparent pricing: calculator and budget planning illustration

A 301 redirect example using .htaccess

On Apache-based servers, the simplest way to permanently redirect a single page is the Redirect directive in the mod_alias module. This directive, defined in the Apache mod_alias documentation , takes the old path and the new full address. The lines below are a general example; replace them with your own addresses before use:

# Tek sayfa: eski adresten yenisine kalıcı yönlendirme
Redirect 301 /eski-hizmet-sayfasi/ https://www.example.com/yeni-hizmet/

# Single page: permanent redirect from the old address to the new one
RedirectMatch 301 ^/blog-eski/(.*)$ https://www.example.com/blog/$1

On WordPress websites, WordPress’s own rules appear between the “# BEGIN WordPress” and “# END WordPress” lines in .htaccess, and this section may be rewritten when permalink settings are saved. Custom redirects are therefore added outside this block, usually above it. Because a small typo in the file can take the entire website down with a 500 error, always back up the file before making changes, and check both the old address and the homepage immediately after adding the rule. Servers using Nginx do not read .htaccess; the same work is done in server configuration and usually requires support from the hosting company.

Is the redirect working correctly? How do you check?

To determine whether a redirect works correctly, examine which status code the old address returns and how many steps it takes to reach the final destination; the page opening is not sufficient evidence on its own. Even if the redirect visibly works in the browser, the code may be 302 instead of 301, or there may be an unnecessary intermediate step.

There are three practical checking methods: the Network tab in the browser’s developer tools shows each step’s status code, requesting only headers with curl on the command line provides the same information quickly, and the URL Inspection tool in Search Console reveals how Google sees the address.

Because browsers can cache permanent redirects, tests should be performed in a private window; otherwise, an old version of a corrected rule may continue to appear. For large migrations, using a crawler that checks all old addresses in the mapping table in bulk is far more reliable than testing individually: for each row, the expected and actual destinations are placed side by side, and differences are corrected.

Common 301 redirect mistakes

Most redirect mistakes arise from incomplete planning rather than from the rule itself. The most frequently encountered mistakes are as follows:

  • Redirecting all old addresses to the homepage; visitors cannot find what they need, and Google may treat this as a soft 404.
  • Using 302 for a permanent change.
  • Creating chains by failing to update old rules during successive migrations.
  • Removing redirects after a few months; old links and bookmarks return to 404 errors.
  • Leaving internal links unchanged so that every click passes through a redirect.
  • Defining the same rule in both a plugin and the server, creating a loop.
  • Leaving old addresses that redirect in the sitemap.

Many of these mistakes are discovered weeks after migration, when a traffic decline is noticed. Regularly monitoring the mapping table before migration and 404 logs and Search Console reports afterward greatly reduces this risk.

Patch afterward or plan beforehand?

In many migrations, redirects are added individually after the new website goes live as 404 errors appear; in a planned migration, the mapping table is prepared before launch and redirects take effect at the same time as the new website. With the first method, both visitors and Googlebot encounter error pages during the period before redirects are added.

In the planned approach, the technical side of migration is also addressed together: if the server changes, the way the new hosting handles redirect rules is tested beforehand, because .htaccess support and server type directly determine the migration method; the hosting aspect is explained in the web hosting selection article. For WordPress websites, migration itself is the subject of the WordPress website migration service, while post-migration crawling and indexing monitoring fall under technical SEO services for the website.

Let’s set up permanent, clean redirects

The aim is the same in every migration, from changing one page’s address to moving the entire website to a new domain: transferring the value of old addresses to new ones without losing it, using the correct code and avoiding chains. Let’s review the scope and determine the appropriate method together.

Frequently asked questions

301 is a permanent redirect, and 302 is temporary. Google uses 301 as a strong signal for showing the new address in results and 302 as a weak signal, generally keeping the old address in results during a temporary redirect.

301 and 308 are permanent, while 302 and 307 are temporary redirect codes. According to Google’s HTTP status codes documentation, it treats 301 and 308, and 302 and 307 in the same way. The difference between 307 and 308 is defined in RFC 9110; with these two codes, the browser must repeat the request to the new address without changing the request method.

302 is a temporary redirect code meaning temporarily elsewhere; it is used for short-term campaigns or maintenance pages. With a temporary redirect, the source address usually remains in search results. Using a temporary code for a permanent change can cause the old address to remain in search results for a long time.

A permanent redirect tells Google that the new address replaces the old one and helps the new address be selected as canonical. For this to work properly, the redirect must lead to relevant content, avoid creating a chain, and be maintained for a long time.

Google’s website migration documentation recommends leaving redirects in place for as long as possible, for the longest feasible period, preferably at least one year. If external links continue pointing to old addresses, keeping them longer makes sense.

No; redirecting numerous old addresses to a single unrelated page may be treated as a soft 404. If equivalent content exists, redirect to it; otherwise, the page returns 404 or 410.

According to Google’s documentation, Googlebot follows up to 10 hops in a chain. Redirecting directly to the final destination is nevertheless recommended.

Yes; on Apache or LiteSpeed servers, this can be done by adding a Redirect 301 rule to .htaccess. The file should be backed up before changes, and the rules should be written outside WordPress’s own block.

308 is a permanent redirect like 301, but requires the browser not to change the request method. It is preferred for permanently moving addresses receiving form submissions or API requests; Google processes 301 and 308 in the same way.