kpumuk / meta-tags

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

Set HTTP headers Link, X-Robots-Tag #233

Open woto opened 2 years ago

woto commented 2 years ago

Hi, I've found your gem and it seems structural and handy instead of scattered @seo_title @seo_description etc... across code base. But I found one thing that worrying me. I use sometimes HTTP headers (Link: ... rel="canonical", Link: ... hreflang="...", X-Robots-Tag: ...) instead of meta tags. I'm not a SEO guru. But I think it is more "faster" way to tell to the crawler (without parsing html step) furthermore it supports cases for example with rendering pdfs etc....

What do you think about this feature in this gem? While waiting the replay I'll look at the source code ;). Thank you.

kpumuk commented 2 years ago

Kind of tricky to implement in the current codebase. The main configuration is in the layout file, at which point it might already be too late to render headers (with streamed rendering, for example). I will think about how this can be solved...