Check a redirect with curl -I in a terminal or the Network tab in browser DevTools, and read each hop's status code and location. Use 301 or 308 when a URL has moved for good, and 302 or 307 when you'll bring it back. Google uses 301 and 308 as a strong signal that the target should be canonical, 302 and 307 as a weak one, and follows up to 10 hops by default. The fixes that matter most aren't about the count: a permanent move served as a 302, and internal links or sitemaps that still point to the source URL.
Three Ways to Check a Redirect
1. curl, one hop at a time
-I fetches only the response headers and doesn't follow redirects. The status on the first line and the location header describe that one hop. Run it again on the location URL to see the next hop.
curl -sI http://seo.codequest.work/ | grep -iE '^(HTTP|location)'
HTTP/1.0 308 Permanent Redirect
Location: https://seo.codequest.work/To get the final URL and the hop count in one go, let curl follow redirects with -L and print them with -w.
curl -s -o /dev/null -L -w '%{num_redirects} hops -> %{url_effective} %{http_code}\n' http://seo.codequest.work/
2 hops -> https://seo.codequest.work/ja 2002. Browser DevTools
In DevTools, check "Preserve log" on the Network tab, then open the source URL. The Status column shows 301, 302, and so on, and selecting a row shows the location response header. Browsers can cache 301s and skip the source next time, so also check "Disable cache".
3. The SEO Checker
Direbase's SEO Checker follows redirects one hop at a time from the URL you enter and shows the count and status codes under "Redirect Chain". See "Check with the SEO Checker" below.
Search Console's URL Inspection isn't the tool here. Google says its inspection tools don't follow redirects, so inspecting the source tells you nothing about the target. Inspect the final URL to check indexing.
301, 302, 308: How Google Treats Each
| Type | Kind | How Google treats it | When to use |
|---|---|---|---|
| 301, 308 | Permanent | Strong signal that the target should be canonical; the target shows in results | The URL moved for good (http→https, domain move, URL change) |
| 302, 303, 307 | Temporary | Weak signal; the source URL may stay in results | You'll bring the old URL back, e.g., a maintenance notice |
| meta refresh (0 s) | Permanent | Treated as permanent; a fallback when you can't redirect on the server | Static hosting where you can't change server config |
| meta refresh (delayed) | Temporary | Treated as temporary | "Redirecting in 5 seconds" pages |
| JavaScript (location) | Permanent | Processed after rendering; Google may miss it if rendering fails | Only when neither server-side nor meta refresh is possible |
Google says the methods higher in the table are more likely to be interpreted correctly, and recommends a permanent server-side redirect whenever possible. It treats 308 like 301 and 307 like 302, but since they mean different things, it advises using the code that fits so other clients benefit too.
Even with a temporary redirect, the target can be indexed if other canonical signals point to it. Still, there's no reason to leave a permanent move on a 302.
Our Own Two Sites Had Two-Hop Chains
On November 13, 2026, we measured the entry points of this site (seo.codequest.work, Next.js) and a separate web-developer media site we run (Site A, WordPress) with curl.
| URL opened | Hops | Codes | What happens |
|---|---|---|---|
| http://seo.codequest.work/ | 2 | 308 → 301 | To https (308), then to the language page /ja (301) |
| https://seo.codequest.work/blog/… | 1 | 301 | To the localized URL /ja/blog/… |
| https://seo.codequest.work/ja/blog/…/ | 1 | 308 | To the URL without the trailing slash |
| http://www.(Site A)/ | 2 | 301 → 301 | To https www, then to the non-www URL |
| http://(Site A)/ | 1 | 301 | To https |
Both sites had two-hop chains. On this site, the host returns 308 for http→https and then the app sends visitors to the language page with a 301 — two separate systems each adding a hop. On Site A, http→https and www normalization are separate rules, so http://www takes two hops. All were permanent; there were no temporary redirects.
We decided not to rush either fix. Every internal link, canonical, and sitemap entry already points to the final URL, so only typed-in http URLs and old external links go through two hops, and Google follows up to 10. We'll merge Site A's rules into one hop the next time we touch the server config. What decides it isn't the count but who actually passes through the redirect.
Deciding What to Fix
| What you found | What to do |
|---|---|
| A permanently moved URL redirects with 302 or 307 | Fix it: switch to 301 or 308. With a temporary redirect, Google doesn't use it as a canonical signal, and the source URL may stay in results |
| Internal links, canonicals, or sitemaps point to the source URL | Fix it, even for a single hop: point them to the final URL. Redirects catch old links from outside; your own site shouldn't keep relying on them |
| Three or more hops, or a loop | Fix it: collapse the chain so the source jumps to the final URL in one hop. A loop means the page never loads |
| Two hops for http → https → www (entry point only) | No rush. If only typed-in URLs or old external links pass through it, Google follows up to 10 hops, so crawling isn't blocked. Merge it into one hop the next time you touch the server config |
| A temporary maintenance notice | 302 is fine. A temporary redirect is right when you want the original URL to stay in results |
For the steps of changing URLs themselves, see URL structure and when to change published URLs; for conflicts between redirects and canonicals, see the canonical tag guide.
Collapsing Redirects into One Hop
These examples send http and www traffic to the final URL in one hop. Replace example.com with your domain.
NGINX
server {
listen 80;
server_name example.com www.example.com;
return 301 https://example.com$request_uri;
}
server {
listen 443 ssl;
server_name www.example.com;
return 301 https://example.com$request_uri;
}Apache(.htaccess)
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^ https://example.com%{REQUEST_URI} [R=301,L]If your host or CDN handles http→https automatically, first check that it and your server config aren't each adding a hop. As on this site, a host-level redirect plus an app-level redirect can make two hops even though neither config contains a chain.
Check with the SEO Checker
The "Redirect Chain" item in Direbase's SEO Checker follows redirects one hop at a time from the URL you enter and shows the count and codes, like "2 redirect(s) (308 → 301)". It's judged as follows.
- No redirects: good
- One hop: caution (no deduction, since http→https and similar are legitimate)
- Two or more hops: deducted, with a suggestion to send the source straight to the final URL
- Any 302, 303, or 307: a separate note to use 301 or 308 if the move is permanent (not scored)
Even with a deduction, use the table above to check who passes through the redirect before deciding. Enter an http or www entry URL to see the entry-point chain, or the same URL your internal links use to see what readers and Google actually go through.
Common Mistakes
- Redirecting a changed URL with 302 because that's the server or CMS default. Some plugins and admin panels default to temporary redirects
- Leaving internal links and sitemaps on the old URL after adding a redirect. It adds a hop and sends Google conflicting signals
- Checking only in the browser address bar. Browsers cache 301s and may skip the source next time, and you can't see how many hops there were
- Inspecting the source URL in Search Console. Google's inspection tools don't follow redirects, so you learn nothing about the target
- Writing http→https and www normalization as separate rules, so every visit takes two hops. One rule can send visitors straight to the final URL
Related Tools
Sources (checked November 13, 2026)
- Google Search Central — Redirects and Google Search (permanent vs. temporary, meta refresh, JavaScript, prefer server-side)
- Google Search Central — How HTTP status codes affect Google's crawlers (up to 10 hops by default; inspection tools don't follow redirects; 301 strong, 302 weak signal)
- Google Search Central — Site moves with URL changes
FAQ
How do I check whether a redirect is a 301 or a 302?▾
How do 301 and 302 differ for SEO?▾
How many redirect hops are acceptable?▾
Is a 308 redirect bad for SEO?▾
Are meta refresh or JavaScript redirects OK?▾
What happens if I inspect a redirecting URL in Search Console?▾
Check Redirects Alongside Everything Else
Enter a URL to see redirect hops and status codes together with 45 checks, including canonical, noindex, and titles.
Run the SEO Checker
Written by
Masakazu Imai. An executive director with over 20 years of experience in sales and business operations. Handles sales, marketing and implementation single-handedly, and develops and runs Direbase.
View profile (in Japanese) →Related Articles
What to Check for AI Overview Optimization | AIO Citation Conditions & SEO Audit Items
AIO citation conditions and audit items verified through 300K-URL analyses and external data. Structured data 3x implementation rate, E-E-A-T, and content clarity are top citation predictors. SEO check items for the AIO era.
Should an SEO Tool Fix Your Code Automatically? | Why We Stop at Generated Code
Our answer to a recurring question: can the API apply the fixes too? An SEO checker always reads somebody else's site, and interpolating those values into returned code opens an indirect prompt injection path. We reproduced it on our own tool, and explain why we hold no write access.
Hyphens or Underscores in URLs? Google's URL Structure Guidance, Non-English URLs, and When to Change Published URLs
Separate URL words with hyphens. Based on Google's URL structure guide updated in October 2026: underscores, letter case, non-English URLs, and whether to change published URLs — with counts from our own two sites and steps for changing URLs safely.
How to Set Up Canonical Tags | Prevent Duplicate Content Issues
Learn how to properly set up canonical tags to prevent duplicate content issues. Practical guide with common mistakes and best practices.