Wordpress website with APO when redirect www loses utms

Hi,

I have a website in wordpress on the domain econsejos.com
The url defined on wordpress config is www.econsejos.com

I am using coudflare with APO and when I access the website without the “www” and with “utms” , like this Aceites Florales: Cuál Utilizar en Cada Ocasión it goes to the “www” version which I believe is the wordpress definition of doing it, and losing the query string in the process.

I am saying that it is because of Cloudflare APO, because on another website that I have, which has Cloudflare but no APO, this situation doesn’t occur.

Example: The 5 benefits of singing for your health and your mind - Online Tips

I have tested with other websites, not own, but have cloudlfare with or without APO and the same thing occurs, when they have APO active, query strings are lost.

1 Like

Differences on the response headers

  1. with APO and losing utms

cf-apo-via: origin,resnok
cf-cache-status: MISS
location: Aceites Florales: Cuál Utilizar en Cada Ocasión
*x-redirect-by: WordPress"

  1. without APO and keeping utms

cf-cache-status: DYNAMIC
location: The 5 benefits of singing for your health and your mind - Online Tips
I don’t find " x-redirect-by" on this case

weekly bump

Have you got some kind of a redirection configured from www to non-www, or using Page Rules?

You own both of the domains?

I’d suggest checking this within some plugin at WordPress, like Yoast SEO, if so.

Is the the Cache Level set to “standard” at Cloudflare dashboard?

1 Like

I’m seeing error 520 when I curl your naked domain (sorry BYPASS DYNAMIC is expected when using curl instead of a browser. So I guess you enabled a PR with BYPASS). Please read 520 for tips on how to avoid this error. It may be what’s causing APO not to perform correctly.

curl -sI https://econsejos.com/aceites-florales-cual-utilizar-en-cada-ocasion/?utm_source=facebook | egrep '^HTTP/|cf-|location|content|cache'
HTTP/2 520
content-type: text/html; charset=UTF-8
cf-ray: 6e5525f98918cffc-GRU
cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
cf-cache-status: BYPASS
cf-apo-via: origin,resnok

Hi,

Thank you so much for taking the time for this.

I have no PR for the domain

We own both of the domains. Difference of between econsejos and onlinetips is that first has CF with APO, the second CF bu no APO.

Yes it is at Standard

No Plugin is doing a redirection. I believe the redirection is made by wordpress itself, because of this config
image

I’m seeing error 520 when I curl your naked domain (sorry BYPASS DYNAMIC is expected when using curl instead of a browser. So I guess you enabled a PR with BYPASS). Please read 520 for tips on how to avoid this error. It may be what’s causing APO not to perform correctly.

Thank you in advance

monday bump

Hi @cbrandt and @fritex … any input?

I still see a 520 when I curl your URL.

But when I visit it with a browser, I get the proper redirect to canonical www. and the UTM query string is kept intact:

What, how?

I am still losing the utms when redirecting to canonical www. :frowning:

I cannot replicate this here. As you can see in the screenshot I’ve posted, the redirected-to URL keeps the UTMs. Just tried again, and it’s working as expected.

Thank you cbrandt… I understand… will do some more tests, but here just losing the UMTs…
JUst opened the ticket because I only see this where i have APO active and if could be from that, would help other people who uses APO…

bump!

Hi again,

So i tested disabling " Automatic Platform Optimization for WordPress" and as soon as I did that, it started working without losing utms…

For the requested URL Request URL:

Aceites Florales: Cuál Utilizar en Cada Ocasión the cf-cache-status starts replying “DYNAMIC”.
Once APO is active, it changes to “MISS”

So, it’s definitely something with APO, don’t know how I can “circumvent” this

1 Like

No one with the same issues when APO enabled?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.