Rails SEO Tips 90% Completed

Too many projects, too little time.  I got most of my Rails SEO hints page completed tonight, after finally implementing more of the suggestions I was making in Daily Bingo Cards itself.

The Table of Contents

The page is still a bit of a work in progress, of course.  I intend to keep it updated and continue gradually expanding the content.  Plus it is 2 AM and I really have no effort to do make the code samples more pretty (what can you expect — I built them by hand in notepad — lots and lots of ampersands, let me tell you). 

If you have any comments about the article, feel free to leave them here.  If you know any Rails developers who might be interested in the resource, please feel free to pass it on to them.

Tags: , , , ,

No Responses to “Rails SEO Tips 90% Completed”

  1. Charlie December 3, 2007 at 3:56 pm #

    My instinct is to just agree with you wholeheartedly about the pretty URLs because… well, they’re just so darn pretty.

    But they’re not without their shortcomings, either. If the value of the field you use for your slug changes, the URLs already floating around in the world for that resource are now invalid. Not likely with your simplified example of bingo card categories, but quite likely for many other types of resources. This, is why you should consider prepending the id to the slug. Maybe the lazy guys are onto something.

  2. Patrick December 4, 2007 at 1:09 pm #

    That is a good point. I’d suggest, rather than prepending the ID, just to save the slug in the database. Let the underlying data change as much as it wants to, but keep the slug static.

  3. Patrick December 4, 2007 at 1:12 pm #

    Incidentally, there is a reason for that. Your approach is workable for the user experience but suboptimal from the point of view of search engines. For example, consider a blog engine with slugs based on titles. If you rename the post three times, you could potentially have links (and link juice) split among three links. Worse, you now have canonicalization issues because Google thinks that all three are distinct pages with duplicate content! Bam go your rankings! Boo. Instead, make a good first guess at the slug and, if you ABSOLUTELY must be able to change that later, do it with a redirect table.

  4. Charlie December 4, 2007 at 11:53 pm #

    Good points. It can become a bit more complicated when you’re not in complete control of the data, though. For example, a site with user-editable pages (and titles) may contain a page with a poorly chosen title. The title can be changed to better suit the content, but you’d still be stuck with a URL that may now be semantically incorrect.

    That’s probably not the case for most folks, though, so I may just be picking at the edge cases.

  5. pngl February 2, 2008 at 11:23 am #

    Time to write a plugin that saves a field into a redirect table when it is modified, and adds a route to keep the old url valid.

  6. Guy Davis February 6, 2008 at 6:30 pm #

    Hi. I’m a big fan of pretty urls as well. For example, my site shows the popularity of your name at http://www.babynamemap.com/boys/Patrick Change the end of the url to another name and it will search for that.

    My big SEO challenge is that to build an engaging and interactive web-app these days, you need to use AJAX and dynamic interfaces. So, I lean heavily on ExtJS for their tree, grid, and window components. That’s great for humans visiting the site, but Google’s crawler completely ignores all the dynamic Javascript. For example, the table listing popular girls names in the US lets visitors quickly navigate a large dataset, but Google just sees the generic HTML page and not the actual popular name data.

    It’s kind of a chicken and egg problem. I need to build an interactive site to impress users and get word of mouth, but that means Google search thinks the site is worthless. Without Google liking my site, hardly anyone visits. Any ideas?

  7. Patrick February 6, 2008 at 11:35 pm #

    Interesting challenges there Guy. Let me think about it and get back to you.

  8. Personal Trainer August 6, 2008 at 11:19 pm #

    Thanks for the tip in regards to the titles and descriptions. I found that successful SEO is extremely challenging and that Google’s magic recipe for success relies on so much more than what information is currently available to us mere mortals in the web world.

    I’ve seen poorly optimized sites rank on the first page and well optimized sites rank way further down.

    As for Guy, you rank decently for the keywords “popular baby names”. I’m assuming you’ve used several optimization tools to check your keyword density, etc?

  9. Hao November 9, 2008 at 4:35 am #

    very nice man! we are modifying my site with your suggestion

    I did find an error in your bookmark code where quotes are not escaped properly. I added this to the title variable

    .gsub(/’|”/, “\\\\’”)

Loading...
Free video + email advice on making & selling software:
(1~2 emails a week.)