How do you set up, monitor, and fix 307 redirects?

ProcrustesPR

Before setting up a 307 redirect, confirm that the URL change is temporary, then choose a setup method based on your website platform and access permissions. Once the redirect is live, test the old URL, document the redirect rules, and monitor for problems through server logs or site audits. When problems arise, first check for unintended rules, redirect chains, loops, and outdated cached redirects. However, not every “307” shown by a tool is a server-side redirect that needs fixing; you also need to determine whether it is related to HSTS.

ProcrustesPRProcrustesPRShould You Use a Website Platform? Decide Based on Maintenance, Expansion, and Migration Needs

First, confirm the purpose of the redirect and your website environment

Semrush’s 2023 article notes that the setup method depends on your website platform, technical skills, and the goal of the temporary redirect. If a page has permanently moved to a new URL, the article recommends using a 301 rather than a 307, which indicates a temporary change. Before making changes, clarify the following:

  • Which old URL should redirect to which destination URL? Is this arrangement still necessary?
  • Does the website use WordPress, another CMS, or a custom-built system?
  • Can you modify server settings or PHP files, or do you need to manage redirects through a plugin?

Choose a setup method based on your permissions, then test it

If your website uses Apache, the Semrush article lists editing .htaccess as an option. It does not provide a complete set of rules, so do not treat it as a ready-to-use configuration for every website. If the page is handled by PHP, the article’s example runs header(“Location: /new-url/”, true, 307); before any content is output, then runs exit; to stop execution. Replace /new-url/ with the actual destination path, save the changes, and then visit the original URL to test the redirect.

If you cannot or prefer not to modify server files, consider a plugin. The article uses the Redirection plugin for WordPress as an example. Consult the current platform and plugin documentation to confirm the available settings and known issues, rather than assuming that the interface steps in an older article still apply.

Monitor not just status codes, but also destination pages and usage

Keep a record of existing redirects and periodically visit old URLs to confirm that they lead to the intended pages. Server logs or site audit tools can help identify URLs that need checking. Review and remove redirects that are no longer needed or were not intended. Also look out for:

  • Redirect chains: For example, page A redirects to page B, which then redirects to page C, requiring multiple redirects before reaching the destination.
  • Redirect loops: For example, page A redirects to page B, which then redirects back to page A.

These situations can slow loading and affect the user experience. If analytics tools show a rise in bounce rate, check whether the destination page is appropriate. That change alone, however, does not establish that a 307 redirect is the cause.

Before making fixes, distinguish configuration errors from HSTS labels

When you find a problem, first review changes to the affected pages, correct any errors, and confirm that the cache is not retaining outdated redirects. If you manage redirects through a CMS, also check the platform documentation and known plugin issues. Complex redirect chains or loops that you cannot resolve are best handled by a developer.

Screaming Frog’s 2017 release notes for version 8.0 state that this version labels insecure links subject to HSTS as “307 HSTS Policy” and requests their HTTPS versions. Those notes explicitly distinguish this label from a genuine temporary redirect, so seeing a 307 alone does not mean that a redirect is malfunctioning. This describes the behavior of that version at the time, not how all current tools display such links.

ProcrustesPRProcrustesPRHow Do B2B Companies Use Blogs and Content Management Systems?

307 redirects: perspectives from across the web

Can JavaScript redirects replace server-side 307 redirects?

The two are not equivalent: JavaScript can redirect users on the client side, but that does not mean the server has returned HTTP 307. Semrush lists JavaScript as an option when server files cannot be modified, but considers it less SEO-friendly than server-side redirects. The redirect occurs only after the page starts loading, which may introduce a delay, and search engines may not execute JavaScript consistently.

How does Google handle 307 redirects?

A respondent on Webmasters Stack Exchange states that Google recognizes 307 as a temporary redirect based on the meaning of the HTTP headers. The respondent also recounts a demonstration by an acquaintance several years earlier, saying that Google periodically revisits pages to check their status. This is secondhand experience and cannot guarantee current revisit frequency or how a particular website will be handled.

ProcrustesPRHow Should a CMS Handle Images? From Upload Optimization to Descriptions and URL Management

References

  1. When redirecting to a beta sub domain should I use 301 or 302?webmasters.stackexchange.com — Discusses: How does Google handle 307 redirects?
  2. Screaming Frog SEO Spider Update – Version 8.0www.screamingfrog.co.uk · 2017-07-18T09:01:45+00:00 — Source used in the article above.
  3. What Is a 307 Redirect? An Overview & How to Use Itwww.semrush.com · 2023-12-07T16:41:00Z — Discusses: Can JavaScript redirects replace server-side 307 redirects?

Related articles

Should You Use a Website Platform? Decide Based on Maintenance, Expansion, and Migration NeedsHow Do B2B Companies Use Blogs and Content Management Systems?How Should a CMS Handle Images? From Upload Optimization to Descriptions and URL ManagementWhat are the features, benefits, and limitations of a CMS?How does a headless CMS work, and what are its benefits and trade-offs?How to Choose Between Wix, WordPress.com, and WordPress.orgWhat types of WordPress are available, and what advantages does each offer for building a website?How can you build a responsive website without coding or Photoshop skills?
ProcrustesPR
ProcrustesPR