Shinji Kuwayama

26 Jan, 2008

How Rails relates to SEO

Posted by: Shinji Kuwayama In: Rails| SEO| Tech Tips

Dave McAnally recently posted an opinion that “Rails maybe isn’t so great for SEO”:http://www.findresolution.com/2008/01/ruby-on-rails-and-how-scaffolding.html. I’m not here to say that Rails is super-awesome for SEO. It’s actually neither here nor there; here’s a little perspective from a Rails developer who does happen to care about SEO.

SEO is like graphic design — it’s a separate layer from code. A Rails app can practice good SEO or bad SEO, just like a Rails app can be ugly or beautiful. There isn’t a direct connection. In priniciple, you shouldn’t expect _anything_ from Rails, SEO-wise, just like you wouldn’t expect it to be good-looking by default. Rather than identify SEO pitfalls in one framework or another, I think it’s better to fight that kind of mistaken expectation.

That said, here are some individual counterpoints to Dave’s notes:

“[Rails is] Javascript , Python and AJAX reliant”

Rails has Javascript libraries and AJAX helpers built-in, yes — but it’s not “reliant” on these in any way. They’re useful if you _choose_ to incorporate those techniques. If you do so at the cost of good SEO, well, that’s on you, isn’t it? I don’t see how having the option available is a negative.

“[Rails is] Extremely Load Sensitive”

I would re-phrase this:
_Tuning a Rails site for heavy load requires special expertise._

This is completely true, and, yeah, it’s a problem. I think it’s a leap to call this an “SEO” problem _specifically_, but no real argument here.

“you HAVE to use their URL mapper with no ability to use a 3rd party or your server’s (e.g. Mod Rewrite)”

This isn’t quite true. A Rails app typically runs as a proxy cluster behind a Web server; for example, Mongrel-behind-Apache is quite common. Since incoming requests hit Apache first, and _then_ the Rails app, you can certainly use mod_rewrite without conflict. I recommend this if you have a lot of redirects; it’s one way of shunting load from mongrel to Apache, which is important under heavy load.

In theory, you could rewrite your URLs in mod_rewrite, and then let Rails re-rewrite them, but I don’t know why anyone would.

The other counterpoint is this. If you’re accustomed to using mod_rewrite, it’s because your existing application generates bad URLs by default, and you need mod_rewrite to pick up the slack. Rails, on the other hand, generates relatively pretty URLs by default, and the built-in routing system makes it easy to customize them as you like. Doesn’t that make Rails _good_ for SEO?

Thanks to Dave for making the original post. There aren’t enough conversations going between developers and SEOs, and I think it’s great that we’re making an effort to talk each others’ language, eh?

No Responses to "How Rails relates to SEO"

Comment Form


  • Shinji Kuwayama: Exceptional does indeed have many more features than Hoptoad. I'll try it out on another project, and post my findings.
  • Eoghan McCabe: Hey Shinji. Exceptional (http://getexceptional.com/) sucks-in all your exceptions (including 404s) but sorts and manages them in a nice way. The 404s

About

View Shinji Kuwayama's profile on LinkedIn Shinji Kuwayama is a Rails developer in Chicago, Illinois.