I've pages with titles like 'Alpha to Beta'. For every such page, there is an inverse page 'Beta to Alpha'. Both pages link to each other.
When someone on Google searches for 'Beta to Alpha', I'd like them to land on the correct page, but sometimes 'Alpha to Beta' ranks higher (or vice versa).
I was thinking of inspecting the referral link when a visitor arrives on my site, and silently redirecting them to the correct page based on what they actually searched for. Just wondering if this could be penalized by Google as 'cloaking/sneaky redirects'?
Or is there a better way to ensure that the correct page on my site ranks higher for the matching query?