I've noticed one bot in particular in our log files that rearranges query parameters when scanning our website. This got me thinking. Does allowing rearranging of query parameters trigger duplicate content penalties with legitimate bots? Because technically, there could be multiple urls that result in identical content because of this. Example:
https://example.com?te=one&tr=two&page=1 https://example.com?tr=two&te=one=page=1 https://example.com?page=1&te=one&tr=two https://example.com?page=1&tr=two&te=one https://example.com?te=one&page=1&tr=two https://example.com?tr=two&page=1&te=one
Obviously this could go further depending on how many query parameters exist. I have a little script that disallows rearranging of query parameters (it issues a 404 if they enter query parameters in the wrong order). I'm just not sure if I should be using that script to issue a 404, or doing a 301 pointing to the correct order url, or using canonical tags pointing to the correct order url.