Creating a well-designed website is only half the battle. You can have the best website on the World Wide Web, but unless people can find it, it’s meaningless. Fortunately, you can incorporate some SEO strategies to help people find your site. With the right strategies in place, the search engines will give you a solid ranking, which will make it easy for people to stumble on your website. Fortunately, these techniques are relatively easy to incorporate, so you can get up and running in no time at all.
Search engines and people like clean URLs. Ruby on Rails provides clean URLs by default, but you can make them even better by editing them. Look through the URLs to make sure there are not any numbers or useless characters in them. If there are, override the titles with new, SEO-friendly ones. For example, if you look at the way that the DevCamp guides are structured you'll see how this can be implemented. The Rails default for one of the guides would be:
That's ugly for search engines and for users. Instead we customized them to be:
As more people use mobile devices than ever before, search engines are looking for ways to provide a better mobile experience. Google has already started assessing mobile friendliness when ranking sites. Fortunately, Rails makes it easy to optimize the mobile experience for users, thanks to the Mobile Fu gem. It detects the devices people use when accessing your site and then automatically adjusts the format based on that device. This gem provides the optimal experience, regardless of the device.
A lot of people think that the days of meta tags are long gone, but that isn’t true. Search engines still look for meta tags when they crawl your site, and if you don’t have them (or if they aren’t SEO friendly), you will have a hard time making it on the first page of the search results. Use a meta tags gem to add them for you, and then go through them to make sure they include all of the basics, such as title, description, and keywords.
Loading speed plays a big role in how your site is ranked. You can easily speed your site up with caching. Rails lets you incorporate server-side and client-side caching. Utilize both options so people and robots can fly through your site. That will make users and search engines happy.
Breadcrumbs are a simple feature that allow users to retrace their steps when they visit your site. You can use location, path, and attribute breadcrumbs. While most people realize that breadcrumbs make the user experience better, they don’t realize that this feature also helps with SEO. Breadcrumbs let robots see the relationship between the pages on your site, and improve your site’s internal linking structure. Both help with your overall SEO strategy. Use a gem, such as Gretel, to create breadcrumbs for your Rails application.
Your SEO strategy should be at the forefront of your mind, regardless of the Rails application you are building. With a solid strategy in place, people will find your site, which will get you one step closer to accomplishing your online goals.
I've been a software engineer for the past decade and have traveled the world building applications and training individuals on a wide variety of topics.