Honestly that’s probably going to be more of a site-specific thing. Some WordPress sites use query strings to actually determine the page, or for other things like sort order within a WooCommerce store, so not something that really should be globally applied (would cause more problems than it would solve).
If it was me, I’d probably address it by using a Cloudflare rewrite rule that redirects the user to the proper URL (without the fbclid parameter), unless you actually need it for something. But if you did need it and were processing it server-side, you also wouldn’t be able to use guest page caching, so…
Personally, I’d like “clean”, universal URLs rather than crap Facebook adds. 🙂
I agree with you that what Facebook adds is basically garbage. I considered implementing a redirect rule, but I was worried it might annoy them somehow—since we get a LOT of traffic from FB—if we did it systematically on every shared link.
I think (though I definitely don’t have your level of experience or expertise) that, like some other caching plugins, having an option to “remove query strings” could make sense for many users because their goal is probably to achieve the best possible performance. That said, I understand your reservations… Thanks 😉
You of course can do whatever you see fit, but I can’t imagine Facebook would go out of their way to penalize a site that removed it. The request isn’t to Facebook’s servers, so they wouldn’t even know in any realistic way without a human checking them. I believe it’s just used as a way for a site owner to figure out where the origination of the link came from (probably most used for Facebook advertising campaigns).
Ultimately it causes a lot of problems beyond just caching because the URLs that have it are seen as a unique page (since the URL is unique) for things like Google Analytics (and other analytics platforms).
Going to mark this one as resolved because in my mind the solution really is site-specific for the reasons I mentioned in my first reply (ignoring query parameters will work for some, but would also cause major problems for other sites).