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.

Explore posts in the same categories: Rails, SEO

Tags: , , , ,

You can comment below, or link to this permanent URL from your own site.

11 Comments on “Rails SEO Tips 90% Completed”

  1. Charlie Says:

    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 Says:

    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 Says:

    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 Says:

    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 Says:

    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 Says:

    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 Says:

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

  8. 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 Says:

    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(/’|”/, “\\\\'”)

  10. Stacy Seo Says:

    I am really impress with you for the selecting of new and unique topic and also well written article on it. Thanks for sharing with us.

  11. Never give up, which is the lesson I learned from boxing. As soon as you learn to never give up, you have to learn the power and wisdom of unconditional surrender.

    Obat PCOS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: