I have a homepage,
https://example.com, where a parameter can be added to unlock a discount on our website
https://example.com?code=abc. I don't want this URL to be appear in Google search results, which it currently does.
According to the following doc, I should add a noindex meta tag: https://support.google.com/webmasters/answer/9689846#make_permanent
I am wondering though if I really should add a noindex meta tag to my homepage when the code parameter is present. I obviously don't want to hurt my home pages' SEO. Specifically, I have some link juice for
https://example.com?code=abc and would like that to benefit
Question 1: is this really safe?
Question 2: would a canonical tag serve the same purpose? So that
https://example.com as canonical. To make things more complicated, the homepage is actually localized as