URL parameters being stripped on www redirect

Hi all. I’m brand new, this is my first post… so thank you in advance for reading :slight_smile:

I have a domain (eg) example . com; that’s using the www. as it’s primary. Some very old links from third-party sites are pointing to the root domain, though.

It looks like Cloudflare is (correctly) redirecting traffic from example . com/my-post/ to www . example . com/my-post/ - however any URL / URI parameters are being stripped during the redirect process; making it hard to track users (who’ve expressly opted-in).

For example; we might have the link:
example . com/my-post/?utm_campaign=vertical_portal

…which is being redirected to:
www . example . com/my-post/

…stripping the UTM data.

Is there any way to prevent the data / parameters from being stripped? Or capturing and redirecting the whole URL / URI?

After a fair bit of digging, this seemed like it might help, but didn’t work:
support . Cloudflare . com/hc/en-us/articles/218411427-Understanding-and-configuring-Cloudflare-Page-Rules-Page-Rules-Tutorial-

Any insight or advice would be greatly appreciated.



Cloudflare doesn’t redirect by default. Did you add a Page Rule for Forwarding? If so, please post a screenshot of it.

Thanks sdayman :slight_smile:

If I’ve read the article correctly, the rules should redirect anything coming in on elder . org, to www . elder . org; and capture / forward the path and query.

…but I’m relatively new to Cloudflare config; so there’s a better than average chance I’m mistaken.

Thanks in advance.

I think if you are using always on SSL than no need for using the http version of page rule. Also you can use bulk redirect

I see that you’re using APO, and APO treats utm query strings differently:

There’s a chance that Bulk Redirect, as cloudcreatr suggested, will override this behavior.

What’s your Caching Level set to? (it’s in your Dashboard, under Caching → Configuration)

1 Like

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