how to apply 'noindex' to all nodes and leave Alias indexable to prevent perceived duplicates for SEO We're working with an SEO specialist who is finding that our underlying /node/### page URLs are competing with our aliases and bringing our page ranking, etcetera down - because they're perceived as duplicate content. (Drupal 8)
I'm looking at anything that is out there, but not sure if any of these cover what I need. Is there a simple way to set all urls containing /node/* to noindex, nofollow? Maybe a way in robots.txt?
Would simply adding this to robots.txt work?
Disallow: /node/*

As a side question, what are the ramifications of making such a change? Any issues I need to be aware of, protect against?
Or maybe there's another way people have solved this problem?
For Drupal8 and 9 what you need is simply this module: https://www.drupal.org/project/redirect. It will redirect all /node/* to its alias. For Drupal7: https://www.drupal.org/project/globalredirect