301 permanent redirect and SEO: what Google does with it, how to set one up, and the mistakes that cost pages

The status codes Google treats as permanent, server rules for Apache and NGINX, the one to one mapping rule, and how to check the result.

Published by AI Knows Us · Updated 12 October 2026

A 301 is the HTTP status code that tells browsers and search engines a page has moved permanently to a new address. Google's own documentation states that Googlebot follows the redirect and the indexing pipeline uses a permanent redirect as a signal that the redirect target should be the canonical URL, so a correct 301 moves a page's search standing to its new address. The rules are short: redirect each old URL to the single closest new URL, use a server side redirect wherever you can, keep every chain to one hop, and leave the redirects in place.

Which codes Google treats as permanent

Google's redirects documentation, checked 10 October 2026, groups redirect methods by how reliably it can interpret them, with server side redirects at the top. Permanent methods are HTTP 301 and HTTP 308, an instant meta refresh set to zero seconds, an HTTP refresh header set to zero seconds, and a JavaScript location change. Temporary methods are HTTP 302, 303 and 307, and a delayed meta refresh set to more than zero seconds. Temporary redirects keep the source page in search results; permanent redirects show the target.

MethodHow Google reads itUse it when
HTTP 301 or 308Permanent, target becomes canonicalThe move is settled and will not be reverted
HTTP 302, 303 or 307Temporary, source stays in resultsA page is away for a short period, for example a service pause
Instant meta refreshPermanentYou have no access to server configuration
JavaScript locationPermanent, read at render timeNothing else is available on the platform

Order of preference follows that table from the top. Server side redirects are read at crawl time with nothing else required, which is why Google's documentation recommends a permanent server side redirect whenever possible for a URL change you want reflected in search results.

How to set one up

On Apache, mod_alias handles the simple case and mod_rewrite the patterned case.

# Apache, single URL
Redirect permanent "/old-page" "https://example.com/new-page"

# Apache, with mod_rewrite
RewriteEngine on
RewriteRule "^/service$" "/about/service" [R=301,L]

On NGINX, a return inside a location block is the cheapest form.

location = /service {
  return 301 https://example.com/about/service;
}

In PHP, set the header before any output.

<?php
header('HTTP/1.1 301 Moved Permanently');
header('Location: https://www.example.com/newurl');
exit();

Hosted platforms usually expose a redirect table in the admin area instead of configuration files, and that table produces a 301 for you. The MDN reference on the 301 Moved Permanently status documents the response itself if you need the specification wording.

The five rules that decide whether you keep the traffic

  • One to one mapping. Send each old URL to the closest equivalent new page. Sending a hundred retired pages to the home page tells search engines those pages are gone rather than moved, and the standing does not transfer usefully.
  • One hop. Old to new, directly. Chains accumulate through site history, so after a second migration rewrite the first generation of rules to point at the current address.
  • Keep them live. Leave redirects in place for as long as the old URLs are linked from anywhere, which in practice means permanently. A removed redirect turns an inbound link into a 404.
  • Match the protocol and the host. Redirect http to https and the non preferred host to the preferred one at the server level, so only one version of each URL ever answers with a 200.
  • Do not mix signals. The destination page should not carry a canonical tag pointing back at the old URL, and the old URL should not be blocked in robots.txt, because a blocked URL cannot be crawled and the redirect cannot be seen.

301 or canonical tag

They answer different questions. A 301 moves the address: the old URL stops serving content and everyone, people included, lands on the new one. A canonical tag keeps both URLs serving content and tells search engines which one to index. Use a 301 when a page has moved or been merged. Use a canonical when two URLs must both exist, for example a printable version or a filtered listing. For the detail of how Google picks between duplicates, see canonical tags and duplicate content.

A site move, in order

  1. Export every indexed URL before anything changes, from your sitemap, your analytics and Search Console.
  2. Build the mapping file: old URL, new URL, one row each. Have a human check the top one hundred rows by traffic.
  3. Put the redirect rules live at the same moment the new URLs go live, so no URL is ever a 404.
  4. Submit a sitemap of the new URLs and keep the old sitemap available for a short period so the old URLs get recrawled and the redirects get seen.
  5. Watch crawl and coverage reports daily for the first fortnight. Google's site moves with URL changes guidance, checked 10 October 2026, sets out the sequence for a full move including a change of address where the domain is involved.
  6. Rewrite internal links to point at the new URLs directly. Internal links should never travel through a redirect.

How to verify the result

Check the header rather than the browser address bar, because a browser shows you the destination either way. A command line request that does not follow redirects shows the code and the target in one line, and a crawler report gives you the same for every URL at once. The three things to confirm: the status is 301, the location header is the exact final URL including protocol and trailing slash convention, and the destination answers 200 rather than another redirect.

curl -I -s https://example.com/old-page | head -n 5

Then recrawl the site and sort by status code. A clean migration shows one hop per old URL, no chains, and no redirect pointing at a 404.

This page covers permanent redirects and how search treats them. For choosing between duplicate URLs that both need to stay live, see canonical tags in SEO. For the wider set of signals on a page, see HTML SEO meta tags.

301 permanent redirect and SEO: the questions that keep coming up

Does a 301 redirect pass full link value?

Google's documentation treats a permanent redirect as a signal that the target should be canonical, which is how a page's standing moves to its new address. The practical way to protect that transfer is a precise one to one mapping and a single hop, because both of those remove any ambiguity about which new page replaces which old one.

How long does a 301 take to take effect?

The redirect works for visitors the moment it is live. Search engines apply it as they recrawl, which happens page by page, so a small site settles within weeks and a large one over a longer period. You can speed up the important pages by submitting an updated sitemap and by linking the new URLs from pages that are crawled often.

How long should I keep a 301 in place?

Indefinitely. The cost of keeping a rule is nothing, and the cost of removing it is every inbound link to that old URL turning into a 404. Review the list once a year, consolidate chains, and keep the file in version control.

Is a 301 better than a 302 for SEO?

They are for different situations. A 301 is right when the move is permanent, because it tells search engines to show the new URL. A 302 is right when the page will return, because it keeps the original URL in results. Use the one that describes the truth of your situation.

Can I redirect many old pages to one new page?

Where several old pages genuinely merged into one new page, yes, and that is a consolidation. Where the old pages covered different subjects, map each to its closest equivalent instead, because a mass redirect to one destination is treated as the old pages being removed rather than moved.

What about redirect chains after a second migration?

Flatten them. Go back to the first generation of rules and point them at the current URL, so every old address reaches the live page in one hop. Chains slow crawling and introduce a point where one broken link in the middle breaks everything behind it.

Citations you cannot redirect

Every redirect you set protects the person who clicks an old link. Buyers who ask ChatGPT, Gemini, Perplexity, Claude or Google's AI Overviews about your category never click one: they read a short answer built from reviews, roundups and forum threads, and some of those still carry your previous domain or company name. A redirect cannot edit those mentions. Keep every 301 live, then correct the facts on the third party pages those answers draw from, so the old name and the new one describe the same business. After a move, AI Knows Us can show which assistants name the business and which sources they leaned on.

Read next

Or browse the whole archive.

See what AI says about you.

The first scan is free, it needs no account, and it asks the questions your buyers ask.

Free. No card. We ask 5 real buyer questions on 2 AI apps.

Already sure you want this? Join the waitlist. We open on 31 October 2026. It costs an email address. No card, and nothing is charged. Or talk to a person if you have a question first. Or read how we fix what it finds.