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 https://example.com.

Question 1: is this really safe?

Question 2: would a canonical tag serve the same purpose? So that https://example.com?code=abc declares https://example.com as canonical. To make things more complicated, the homepage is actually localized as https://example.com/de?code=abc and https://example.com/en?code=abc.

1 Answer 1


You definitely want to use a canonical tag here, not noindex.

For URLs of the form https://example.com/de?code=abc, use a canonical tag pointing to https://example.com/de.

For URLs of the form https://example.com/en?code=abc, use a canonical tag pointing to https://example.com/en.

The noindex directive tells the crawler that it should not index the page. The canonical tag tells the crawler that it should index the page but at a different URL, which fits your intent much more closely.

  • Hm, I thought so too in theory, but I've done that many days ago and Google Search results still lists https://example.com/de?code=abc... (I've already asked to recrawl the page etc) Mar 26, 2022 at 9:50
  • This is precisely what my head includes: <link rel="canonical" href="example.com/en"><link rel="alternate" hreflang="en" href="example.com/en"><link rel="alternate" hreflang="de" href="example.com/de"> Mar 26, 2022 at 9:54
  • 1
    Unfortunately, Google can take weeks to update its index depending on how often it crawls your site. If you've already requested a crawl, the only other thing to do may be to wait. Personally I would be wary of trying to speed it up through some sort of removal request. Google says this about removal requests for non-canonical pages: "Don’t use the URL tool to block the URLs you don’t want in search results. It won't keep your favorite version of a page; instead, could remove all versions (http/https and www/non-www) of a URL." Mar 26, 2022 at 15:49
  • Alright, it's not like it's a super prominent Search Result anyway, so I'll just leave it as is and check in on it every now and then. Thanks! Mar 26, 2022 at 16:05
  • 1
    Yh, it's actually disappeared :) Apr 17, 2023 at 10:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.