I’m migrating our Gatsby project from Netlify to Cloudflare Pages.
My website is currently hosted on Netlify
We have had a clean URL structure on Netlify (without slash at the end) and I want to keep it that way for the best SEO performance. To achieve this on Netlify we just had to disable the “Pretty URL” option (can’t post a link, sorry).
However, Cloudflare Pages adds a redundat 308 redirect and a slash at the end of the URL:
This lowers our Lighthouse Speed scores:
And may cause other unwanted issues (SCHEMA, crawling and indexing issues for search engines). Since our project is strictly focused on top SEO performance, we can not allow this.
Do you have any ideas how to solve this problem?
ok I now see what you mean.
Can you please tell us if “URL Normalization” is turned on? Maybe thats the cause.
One of these was turned on.
It is now disabled. It didn’t help.
Preview below. Chrome, no cache, private window:
I’m checking redirects status with this tool:
This has been raised with the team, they will discuss it and decide what to do. They do see the issue.
Is there any way we can monitor the status of this specific issue? How do I know if / when it’s fixed?
Is there any update from the team? Just came accross the same issue and tried everything: rules, functions, _worker, workers etc. Unfortunately nothing seems to be solving the problem for me. Either I’m getting TOO_MANY_REDIRECTS or the whole page stops working due to 522 and worker logs just respond with “Closed”.
@user8867 did you perhaps find a workaround?
Hi @matteo. Is there any update on timing or a fix for this issue? I’m trying to migrate from Netlify to Cloudflare Pages asap, but this issue is a blocker.
Yes, after days of testing I found a workaround.
Here’s what to do:
- Deploy your site to Netlify. Make sure to add the domain on Netlify. Otherwise setup won’t work.
- Point CNAME to your app on Netlify
- Point A record to 18.104.22.168. It’s Netlify load balancer.
Cache everything with Cloudflare with Page Rules
- The slash and redirect issue is fixed
- My site is hosted and deployed on Netlify
- 90% of my traffic is proxied with Cloudflare
Replying to everyone here, I don’t have an update and the team is on holiday. Unfortunately I told all I know, and I’m not with the team, so nothing more I can do
I’ll ask the team after the holiday period, but it was always a, we see the issue, we’ll consider the fix. They have a very big update coming on other things, after that, I presume they’ll fix other stuff.
@matteo are there any updates on this?
Sorry, no updates on this yet. We have discussed this and know the pain point. We’ll post an update here when we have one.
Thanks for the update (after probably my last use of the notify feature ).
Can’t wait for that update! I’m waiting to move all projects to Cloudflare and ditch AWS & Cloudfront altogether for Front-End deployments.
Hi. I’m facing the same issue. Any updates?
Hey @matteo, does Cloudflare have any platforms that we can use to vote for this feature? It would really be great if I don’t have to deploy to Netilfy and setup corresponding DNS records. Much better if Cloudflare can provide this.