Skip to content
Have a project in mind?
The Gloria JournalWebsite management

301 redirects: when to use them and how to set them up

Row of traffic lights strung across a road

A redirect is an instruction sent by your server to whatever asked for a page: this address is no longer the right one, here is the new one. The visitor rarely notices. Search engines read it as first-order information — it tells them whether the move is permanent or temporary, and therefore which URL belongs in the results.

The subject looks purely technical. It is mostly commercial. Any site that is still alive eventually moves: a redesign, a new domain name, the switch to HTTPS, a reorganised menu. At each of those moments, the redirect plan decides whether the audience and the links you have earned follow you across, or quietly disappear.

When a redirect is the right answer

The cases are few and easy to recognise:

  • a change of domain name: old-site.co.uk to new-site.co.uk;
  • moving from HTTP to HTTPS, or settling once and for all on www or no www;
  • a site redesign that changes the URL structure: /old-category/product to /new-category/product;
  • tidying up technical URLs: /index.php?id=589 to /product-name;
  • merging two pages that covered the same subject.

There is also a case where a redirect is the wrong answer: a page deleted with no equivalent. Sending vanished content to the home page helps nobody. A 404 (not found) or a 410 (gone) is more honest, and clearer for search engines.

301, 302, 307, 308: what Google reads

All of these codes move the visitor in the same way. The difference is in how a search engine interprets them: which URL does it treat as the reference version, the one it will show in its results?

Redirect codes and how Google reads them — source: Google Search Central, Redirects and Google Search
Code HTTP meaning How Google reads it
301 Moved permanently Strong signal: the target becomes the canonical URL
308 Moved permanently, method preserved Treated like a 301
302 Found, temporary move Weak signal: the original URL may stay in the index
307 Temporary redirect, method preserved Treated like a 302
Meta refresh, zero delay Client-side, immediate Read as permanent
Meta refresh, delayed Client-side, after a pause Read as temporary

Two practical consequences. First, the rule stays simple: if the change is permanent, send a 301 or a 308. Second, even though Google treats 301 and 308 alike, the codes are not interchangeable for other clients. A 307 and a 308 preserve the original HTTP method, which matters for forms and APIs. Google's own advice is to pick the semantically correct code.

The "15% loss" rule is out of date

For years the industry repeated that a 301 redirect cost roughly 15% of a link's strength, a figure borrowed from the damping factor in the original PageRank paper. The conclusion people drew from it — that a chain of three redirects would burn nearly 30% — was already an extrapolation of an extrapolation.

In July 2016, Gary Illyes, then an analyst at Google, said publicly that 3xx redirects no longer lose PageRank (reported by Search Engine Land). Google's current documentation quotes no loss percentage at all. It describes a difference in kind rather than in quantity: a 301 is a strong canonicalisation signal, a 302 a weak one. The question is no longer "how much do I lose" but "which URL will Google keep".

That does not make redirects free. Each one adds a network round trip, and therefore latency for the user. A chain nobody is watching ends up showing in page load times, particularly on mobile connections.

Four ways to set up a redirect

On the server, the recommended method

This is the one Google puts at the top of its list, because it is the most reliably interpreted. On an Apache server, in the .htaccess file:

Redirect permanent "/old-page" "https://example.co.uk/new-page"

For anything with patterns or conditions in it, you move to mod_rewrite. On NGINX, the equivalent is a single line inside the server block:

return 301 https://example.co.uk/new-page;

In PHP, the redirect has to be sent before anything is printed to the page:

header('HTTP/1.1 301 Moved Permanently');
header('Location: https://example.co.uk/new-page');
exit();

From WordPress, with a plugin

When you have no access to the server configuration, or want a non-technical colleague to manage redirects, the Redirection plugin remains the usual choice, with more than two million active installations according to its WordPress.org listing. The paid versions of Yoast SEO and Rank Math include an equivalent feature, often preferred because it creates the redirect automatically when you edit a URL.

One caveat: these redirects are executed by PHP, so they fire after WordPress has loaded. That works, and it is only slightly slower than a server rule. On a WordPress rebuild with thousands of moved URLs, server-level rules are the better home for the bulk of the plan.

At the host or the registrar

Most registrars and hosts offer domain forwarding in their control panel. That is convenient for a brand domain or a defensively registered typo. Be careful, though: many of these options send all traffic to the home page. Google treats bulk forwarding to an unrelated destination as an error, and it can end up handled as a soft 404.

What to avoid

JavaScript redirects come last in Google's recommendations: the page has to render successfully before the redirect is discovered, and rendering can fail. A delayed meta refresh is read as temporary, which is almost never what you meant.

How to check the redirects on a site

Three tools cover most situations. At the command line, curl -IL https://example.co.uk/old-page prints the full sequence of status codes returned. It is the quickest way to verify a rule, and to spot a loop.

For a whole site, a crawler does the work. Screaming Frog SEO Spider is free up to 500 URLs per crawl, with a paid licence to lift that limit; check the vendor's pricing page for the current figure. The "Response Codes / Redirection (3xx)" filter lists the affected URLs and their destinations.

Search Console is the final arbiter. The URL Inspection tool shows what Google actually sees, and the page indexing report flags URLs excluded because of a redirect. It is the right place to watch how pages are being indexed in the weeks after a migration.

A redirect audit often turns up something unexpected: many of the 3xx responses on a site come from its outbound links, still pointing at HTTP addresses on sites that moved to HTTPS years ago.

The mistakes that cost the most

Redirect chains. Page A to page B to page C. Google's crawlers follow up to 10 redirect hops by default, but the site move guide advises pointing straight at the final destination, keeping chains to no more than three hops and staying under five. Every hop adds latency, and not every client handles long chains gracefully.

Loops. A rule that sends a URL back to itself, usually created by stacking a server rule on top of a plugin rule. The site becomes unreachable, and curl -IL catches it in seconds.

Internal links left untouched. A redirect is not an excuse for leaving your own links, your menu and your XML sitemap pointing at the old addresses. The sitemap should contain the new URLs, not the old ones.

Buying an expired domain and redirecting it. Acquiring an expired domain and forwarding it to your own site in the hope of inheriting its reputation is a losing bet. Google's spam policies name expired domain abuse explicitly: an expired domain repurposed mainly to manipulate rankings.

How long should redirects stay in place?

Google's guidance on site moves with URL changes is explicit: keep the redirects as long as possible, and for at least a year. That window lets the search engine transfer the signals to the new addresses, including by recrawling the third-party sites that still link to your old URLs. From the visitor's point of view, indefinitely is better than a year.

A last detail that gets forgotten: the Change of Address tool in Search Console applies only to a move to a different domain or subdomain. It does nothing for an HTTP to HTTPS switch, for choosing between www and no www on the same domain, or for an internal reorganisation of URLs.

Common questions

What is the difference between a 301 and a 302 redirect?

A 301 signals a permanent move: the search engine keeps the new URL as the reference version and shows it in results. A 302 signals a temporary move, so the original URL can stay indexed. Google treats a 308 like a 301 and a 307 like a 302, though the method-preserving codes matter for forms and APIs.

Does a 301 redirect lose you rankings?

The 15% loss rule is an old approximation that Google's current documentation no longer repeats. In practice, the losses observed after a migration come from an incomplete redirect plan, chains that are too long, or pages sent to unrelated destinations — not from the 301 itself.

How do you set up a 301 redirect in WordPress without touching code?

Use a dedicated plugin such as Redirection, or the redirect feature included in the paid versions of Yoast SEO and Rank Math. You enter the old and new URLs from the admin screens. The redirect is then executed by PHP, which is slightly slower than a rule written in .htaccess or in the NGINX configuration.

How long should redirects be kept after a redesign?

Google recommends at least a year, long enough for the signals to transfer to the new addresses and for third-party sites linking to your old URLs to be recrawled. For visitors, and for external links you do not control, keeping them permanently is the safer choice.

What is a redirect chain and why avoid it?

A chain occurs when one URL redirects to a second, which redirects to a third. Google's crawlers follow up to ten hops by default, but every step adds latency and not every browser or client handles long chains well. Rewrite the rule so it points directly at the final destination.

Should a deleted page be redirected to the home page?

Not unless a genuinely equivalent page exists. Sending removed pages en masse to the home page confuses visitors and can be interpreted by Google as a soft 404. A 404 or a 410 is the appropriate response for content that has been deleted without a replacement.

Can you check a redirect without any paid tool?

Yes. curl -IL followed by the URL prints the whole sequence of status codes and final destination from the command line. For a site-wide view, use a crawler with a free tier, plus the URL Inspection tool in Search Console.

This link opens in a new tab.