What Is a 301 Redirect, and When Should You Use One?

ProcrustesPR

A 301 redirect uses an HTTP response status code to indicate that a page has permanently moved to a new URL. It sends visitors to the new location and signals to search engines that the new URL should be treated as canonical. Use it for permanent URL changes, domain migrations, or consolidating multiple pages into a new page with corresponding content. A 301 should not be the default choice for a temporary move or a deleted page with no suitable replacement content.

ProcrustesPRProcrustesPRHow should you balance CNAME convenience and performance?

Direct old URLs to their permanent replacements

According to Google Search Central, use permanent redirects when you do not plan to move back to the original URLs. If you want search results to display the new URL, use a server-side 301 or 308 whenever possible. Common uses include:

  • Changing a website’s domain: Redirect each old URL to its corresponding new URL.
  • Changing a page’s URL: Keep old links working so visitors can find the content after it moves.
  • Choosing one preferred URL: When multiple URLs serve the same content, select a preferred URL and redirect the others to it.

For example, if a page’s ID stays the same but the title at the end of its URL changes, whether to set up a permanent redirect still depends on whether you will use the new URL permanently. If so, the principles above apply. An unchanged ID alone does not mean you can ignore the old URL.

Merging pages can justify a redirect; deleting them may not

If you combine the content of several articles into one comprehensive guide, you can redirect the old URLs to the new page. That page should genuinely include the original content—not simply be any URL that still works.

Google explicitly warns that redirecting many old URLs to an unrelated homepage may confuse visitors and may be treated as a soft 404. If the original page and its content no longer exist, and there is no replacement page with similar content, return a 404 or 410 rather than forcing a 301 redirect. A custom 404 page can offer navigation and useful information, but it must still return the correct 404 status code.

Use 302 for temporary moves, including tests

Before choosing a redirect type, confirm whether the original URL will be used again. If visitors are only being sent to an information page during a service interruption, a temporary redirect is appropriate and helps retain the original URL in search results.

If a website test redirects visitors to a page version at another URL, Google also recommends using 302 rather than 301. Permanent and temporary redirects send different signals, so a successful redirect in the browser is not enough to judge whether you have chosen the right type.

Setup difficulty varies, and immediate ranking gains are not guaranteed

The setup method depends on the hosting service, server environment, and website backend. Some platforms may have built-in features, but that does not mean setup will be easy for every website. Start by mapping old URLs to new ones. Then redirect the old URLs directly to their final destinations, update internal links, and verify that the old URLs return the correct status codes.

For SEO, Google states that 301 and other permanent redirects do not cause a loss of PageRank. It also notes that rankings may fluctuate temporarily during a site migration. Preserving PageRank does not mean rankings will stay unchanged or improve immediately after you set up redirects.

ProcrustesPRProcrustesPRShould you use a 302 redirect to a temporary alias for the new server during a DNS update?

301 redirects: perspectives from across the web

When should you consider using 308 for a permanent redirect?

If a permanent move needs to preserve the original HTTP request method, such as POST or GET, consider using 308. This is particularly important in situations such as order submissions, where the original request method needs to be maintained. Before choosing, confirm which requests the website actually receives and how the new destination handles them; do not judge solely by whether the URL redirects successfully.

How should you remove an AMP version while keeping the regular webpage?

Google recommends first removing the rel="amphtml" link from the source code of the canonical non-AMP page, then redirecting the removed AMP URL to the canonical page using 301 or 302. If you want permalinks to keep working, you can use 301. This approach applies when the canonical non-AMP page remains available.

When testing page versions at multiple URLs, what markup can you use besides redirects?

If multiple test URLs serve identical or similar content, Google recommends adding rel="canonical" to the alternative versions to identify the original URL as the preferred version. If the test redirects visitors from the original URL to another version, Google recommends using 302. Once the test ends, remove the alternative URLs, testing scripts, and markup as soon as possible.

ProcrustesPRHow does HSTS protect websites and subdomains?

References

  1. 重新導向與 Google 搜尋 | Google 搜尋中心  |  Documentation  |  Google for Developersdevelopers.google.com — Source used in the article above.
  2. 網站遷移與移轉作業 | Google 搜尋中心  |  Documentation  |  Google for Developersdevelopers.google.com — Source used in the article above.
  3. 如何從 Google 搜尋中移除您的 AMP 網頁 | Google 搜尋中心  |  Documentation  |  Google for Developersdevelopers.google.com — Discusses: How should you remove an AMP version while keeping the regular webpage?
  4. 針對搜尋進行 A/B 測試的最佳做法 | Google 搜尋中心  |  Documentation  |  Google for Developersdevelopers.google.com — Discusses: When testing page versions at multiple URLs, what markup can you use besides redirects?
  5. 排解 Google 搜尋檢索錯誤 | Google 搜尋中心  |  Documentation  |  Google for Developersdevelopers.google.com — Source used in the article above.
  6. 308 Permanent Redirect: What It Means & When to Use Itwww.semrush.com · 2023-11-20T09:24:00Z — Discusses: When should you consider using 308 for a permanent redirect?

Related articles

How should you balance CNAME convenience and performance?Should you use a 302 redirect to a temporary alias for the new server during a DNS update?How does HSTS protect websites and subdomains?How do SSL certificates protect websites, and why are they needed?Should a Tumblr blog use the platform’s domain or the company’s domain?What types of URLs are there, and what are they used for?When should you use relative or absolute paths in WordPress?What are www subdomains and relative links used for?
ProcrustesPR
ProcrustesPR