kpumuk / meta-tags

Search Engine Optimization (SEO) for Ruby on Rails applications.
MIT License
2.73k stars 275 forks source link

feat: skip canonical on noindex pages #214

Closed salzig closed 3 years ago

salzig commented 4 years ago

Based on a Comment of John Mueller (Webmaster Trends Analyst at Google) on Reddit

This is also where the guide that you shouldn't mix noindex & rel=canonical comes from: they're very contradictory pieces of information for us. We'll generally pick the rel=canonical and use that over the noindex, but any time you rely on interpretation by a computer script, you reduce the weight of your input

This merge request therefor introduces a configuration for MetaTags that allows us to choose if we want to skip the canonical url on noindex pages, as it could "override" the noindex for that page.

salzig commented 4 years ago

Formatting Coverage is failing... awesome.

related issue: https://github.com/codeclimate/test-reporter/issues/418

salzig commented 4 years ago

rebased on top of https://github.com/kpumuk/meta-tags/pull/215

kpumuk commented 3 years ago

Merged in https://github.com/kpumuk/meta-tags/pull/227