开发者

Anyone got SEO tips for Ruby on Rails [closed]

开发者 https://www.devze.com 2022-12-25 02:03 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. 开发者_如何学编程

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question

Can anyone recommend some RoR plugins and/or general sage that will help me with SEO?


I myself was searching for some guide on SEO for ruby on rails, surprisingly there was no updated/recent article on the web (this post ranks #1 in google and this is also 3 years old) as that link seoonrails is dead and other articles are written in 2010 so I went ahead and wrote a complete SEO for rails guide http://www.inboundio.com/blog/seo-for-ruby-on-rails-complete-guide/. It took me 3 days to write it (including the infographic) and I have tried to link back to railscasts and other sources where ever possible to make it more helpful.

To answer OPs questions, following gems can be used as starting point -

  1. Friendly ID - https://github.com/FriendlyId/friendly_id
  2. Meta Tags - https://github.com/kpumuk/meta-tags
  3. MetaMagic - https://github.com/lassebunk/metamagic
  4. Sitemap - http://rubygems.org/gems/sitemap or http://rubygems.org/gems/xml-sitemap
  5. Breadcrumbs - https://github.com/lassebunk/gretel

You can further refine your rails app with following gems

  1. Rack cache (for caching) - http://rubygems.org/gems/rack-cache
  2. GeoCoder (for geotargeting) - https://github.com/alexreisner/geocoder
  3. Geokit (for geotargeting) - https://github.com/geokit/geokit
  4. Mobile fu (for better Mobile Optimization) - https://github.com/brendanlim/mobile-fu


SEO is a field by itself. But for a rails app you could use the following gems to make you site more search engine friendly.

  • Metamagic http://github.com/lassebunk/metamagic
  • Headliner https://github.com/mokolabs/headliner
  • Gretel for breadcrumbs http://github.com/lassebunk/gretel
  • FriendlyID for SEO friendly urls http://github.com/norman/friendly_id
  • DynamicSitemaps for generating stiemaps http://github.com/lassebunk/dynamic_sitemaps

Finally all these and a small description on how to use them could be found on this blog post http://lassebunk.dk/2011/03/09/rails-seo-pack/ by Lasse Bunk


Sorry to resurrect such an old question, but it's been on my mind too, I'll share what I came up with.

As you probably know, SEO is pretty blurry in general. But these are a few of the core things that I've discovered from my reading. But I'm no SEO whiz.

  1. A good strong name. Every page's title attribute should somehow be titled for its content specifically. It's also not a bad idea to ensure that it has near 60 characters. As far as getting the title to change depending up on the page, you could do something like this: http://railscasts.com/episodes/30-pretty-page-title (the railscast is a bit dated, maybe there's a newer way to get this done?) Rails 3 - Ideal way to set title of pages (I kind of like the look of this one.)

  2. Create a robots.txt file You just throw it in your public folder with something like this, assuming you want all of your pages indexed:

    User-agent: *
    Disallow:
    
  3. Create a Sitemap and submit it to Google Web Developer Tools I just checked this one out, and it did what I wanted. https://github.com/kjvarga/sitemap_generator

  4. You might look at rails powered meta tags using the following gem, though, I've not used it: https://github.com/parndt/seo_meta

And, I think that really wraps it up for rails specific things. There are so many other SEO resources out there, and so many of them are just things that you manipulate the view to accomplish, so they're not really rails questions at that point.

A few other things to think about as well, but they're not really rails specific, and mostly in your views.

  • Make sure your code is W3C valid
  • Title attributes for image tags.
  • Using header tags appropriately.
  • Don't put text in images, that's what text is for. If you want to use a pretty font, use google fonts.
  • Make sure you have outbound links to resources that make sense for the context of your page.
  • Create a printable stylesheet.


I believe the most important ingredients to SEO are:

  1. good content and
  2. good inbound links.

None of these can be achieved using any plugin.

See also SEO: Where do I start?

0

精彩评论

暂无评论...
验证码 换一张
取 消