Cloudflare static assets redirect trailing slashes with a 307: how does Google see it?
Google treats a 307 as a temporary redirect: Redirects and Google Search (checked 2026-11-10; the page carries no date) says 302, 303 and 307 are temporary, that Googlebot follows them but does not take them as a signal that the target should be the canonical URL, so the source URL may stay in results. Only 301 and 308 are permanent.
Cloudflare's Workers Static Assets: HTML handling (the page says updated 2026-04-23) states that the default mode auto-trailing-slash redirects the non-canonical form to the canonical one, and the status code in the page's tables is 307. The result: a URL missing one slash, like /guides, returns a temporary redirect by default on Cloudflare static assets.
For most sites this is a small matter, because the slash version is what you write in the sitemap and canonical. But if many external links, old links and social shares use the slash-less form, a temporary redirect is a weaker signal.
How did kagentx fix it?
On 2026-11-09 the marketing pages of kagentx.com were changed to generate a _redirects file at build time, with one slash-less to slash 301 for each page directory. Cloudflare's docs say a _redirects line can carry 301 and that the default is 302 when none is given; our approach is to write 301 explicitly. The generating script is web/scripts/build-cf.sh:
# web/dist/_redirects (generated at build time, one line per marketing page directory) /guides /guides/ 301 /pricing /pricing/ 301 /zh/guides /zh/guides/ 301 /zh-hant/pricing /zh-hant/pricing/ 301
1. The rules run before the automatic slash handling
When a page is requested without the slash, the 301 in _redirects matches first, instead of the static assets' default 307. The test in the next section shows the result.
2. Paths the Worker handles first are left out
Paths the Worker takes first, such as /radar/, /agents/ and /p/, are left to the Worker to redirect and are not put in the file.
3. Exceeding the limit fails the build
Cloudflare's docs say _redirects allows at most 2000 static rules; the script fails the build when that is exceeded, instead of silently dropping rules.
What does each of our four sites return today?
On 2026-11-10 we tested with curl, once each for the slash-less, slash and doubled-slash forms (paths are real pages on each site; gammaslide.com answers HEAD with 405, so its status codes were taken with GET):
| Site (host) | Without slash | With slash | Doubled slash |
|---|---|---|---|
| kagentx.com(Cloudflare) | /guides → 301 /guides/;/pricing → 301 /pricing/;/zh/guides → 301 /zh/guides/;/zh-hant/pricing → 301 /zh-hant/pricing/ | /guides/ → 200 | /guides// → 307 /guides/ |
| pagent.kagentx.com(Fly,经 Cloudflare 代理) | /signals → 301 /signals/ | /signals/ → 200 | //signals/ → 200 |
| mochistamp.com(Fly) | /en → 301 /en/ | /en/ → 200 | //en/ → 404 |
| gammaslide.com(Fly) | /ja → 301 /ja/;/pricing → 200 | /ja/ → 200;/pricing/ → 301 /pricing | //ja/ → 404 |
How to read it:
1. kagentx.com's slash-less URLs are already 301
The fix works; the doubled slash such as /guides// still returns a 307, which we infer is the static assets' own slash handling still at work, since _redirects holds only the pages we wrote.
2. The four sites follow different conventions
On gammaslide.com, /pricing is the canonical form and /pricing/ is what gets a 301; for other pages the slash form is canonical. What matters is that each page has exactly one canonical form, every other form 301s to it, and canonical, sitemap and internal links all use that one.
3. Doubled slashes do not necessarily need handling
The three sites treat addresses starting with // differently (200, 404, 307); this is a rare form and outside the scope of this fix.
What is the difference between 301, 302, 307 and 308?
| Status code | Meaning | What Google's docs say | When to use it |
|---|---|---|---|
| 301 | Moved permanently | Permanent; a signal that the target should be canonical | The address changed for good, or unifying the slash form |
| 308 | Moved permanently; the client must resend with the same method | Listed as permanent together with 301 | Permanent move where you do not want a POST turned into a GET |
| 302 | Moved temporarily | Temporary; followed but not treated as a canonical signal | A temporary jump, for example during a campaign |
| 307 | Moved temporarily; the client must resend with the same method | Listed as temporary together with 302 and 303 | A temporary jump that keeps the request method; Cloudflare static assets use it for automatic slashes |
The “resend with the same method” column comes from the HTTP specification (RFC 9110), which we did not reopen today to check. Google's docs add two more points: an instant (0-second) meta refresh is treated as a permanent redirect and a delayed one as temporary; a JavaScript redirect should be used only when server-side and meta refresh redirects are not possible, and if rendering fails Google may never see it.
For how status codes affect AI crawlers see How do HTTP status codes affect AI crawlers? 404, 410, 301, 429, 5xx; for how to set canonical URLs see Canonical tags and duplicate content: how to set them up on a multilingual site so pages are not treated as duplicates.
How do the main hosts handle trailing slashes by default?
Only what we verified from official documents on 2026-11-10; what we could not read is marked unverified:
| Host | Default behavior | How to fix | Source |
|---|---|---|---|
| Cloudflare Workers static assets | Default auto-trailing-slash: adds the slash automatically, and the docs give 307 as the status code | Options force-trailing-slash, drop-trailing-slash, none; for a 301 use _redirects as kagentx does | Workers Static Assets: HTML handling |
| Cloudflare Pages | Unverified: the docs page does not explain the default for slash-less URLs | _redirects supports 301, 302, 303, 307 and 308, and defaults to 302 when no status is written; 2000 static and 100 dynamic rules | Pages: Redirects |
| Vercel | trailingSlash is unset by default: no redirect | With trailingSlash set to true or false it uses 308; with true, paths that have a file extension do not redirect | vercel.json docs (the page says updated 2026-08-14) |
| Netlify | Unverified: the page we opened does not cover trailing slashes | _redirects and netlify.toml default to 301 when no status is written | Redirects overview |
| GitHub Pages | Unverified: the page we opened does not cover it | Not verified | Creating a GitHub Pages site |
How do I check my own site's trailing-slash redirects?
1. Get the status code for both forms
The three commands below look at the slash-less form, the slash form and the whole redirect chain:
# Status code and Location of the version without the trailing slash curl -sI https://example.com/guides | grep -iE "^HTTP|^location" # Same for the version with it (should be 200, no Location) curl -sI https://example.com/guides/ | grep -iE "^HTTP|^location" # Follow the whole chain and count hops curl -sIL -o /dev/null -w "%{http_code} hops=%{num_redirects} final=%{url_effective}\n" https://example.com/guides2. Make sure there is only one canonical form
A slash-less URL should do one 301 to the canonical form, and the canonical form itself should be 200 with no Location. If the chain is longer than one hop, merge it.
3. Make canonical, sitemap and internal links all use the canonical form
Otherwise the signals Google sees contradict each other.
4. See whether crawlers hit the 307 in your logs
If your host returns 307 by default and you cannot change it, add 301 rules as kagentx did.
FAQ
Does a trailing-slash 307 stop Google indexing my page?
Not by itself. Google's documentation says a 307 is a temporary redirect that Google follows but does not take as a signal that the target should be canonical, so the slash-less URL may stay in results. To make the slash version the only canonical URL, use 301 or 308, and match it in canonical and the sitemap.
Is there a difference between 301 and 308 for Google?
Google's documentation lists both as permanent redirects with the same wording. The difference is at the HTTP level: 308 requires the client to resend with the same method, while 301 has historically allowed turning a POST into a GET. That comes from the HTTP specification, which we did not reopen today.
Can Cloudflare static assets change the 307 to a 301?
In our case it could not be changed: html_handling only lets you choose automatic slash, force slash, drop slash or off, and the docs give 307 for its redirects. kagentx's workaround is to generate _redirects at build time with one 301 per page, which runs before the automatic slash handling.
Is there a limit on _redirects?
Cloudflare's docs say at most 2000 static rules and 100 dynamic rules, and recommend Bulk Redirects beyond that. kagentx's build script fails when it would exceed 2000.
What do Netlify and GitHub Pages return for a slash-less URL?
We have not verified this: neither official page we opened today covers it. Running the curl commands in this guide against your own site is the most reliable check.
Sources
- Google Search Central · Redirects and Google Search (Viewed 2026-11-10; the page carries no date)
- Cloudflare · Workers Static Assets: HTML handling (Viewed 2026-11-10; the page says updated 2026-04-23)
- Cloudflare · Pages: Redirects (Viewed 2026-11-10; the page carries no date)
- Vercel · Static Configuration with vercel.json (Viewed 2026-11-10; the page says updated 2026-08-14)
- Netlify · Redirects overview (Viewed 2026-11-10; the page carries no date)
- kagentx · kagentx.com/guides (Tested with curl on 2026-11-10)
- kagentx evaluations: the data on the case study pages; each example gives its date.