Make your new Rails website more SEO standard, search bot friendly

Tram Ho

When creating a new Rails website, what should be done to standardize SEO ? How can the website written in Rails be search engine friendly and easy for search engines to index? Best support for website to rank high on search engines ?


Since the starting point is an SEO-er, when developing web applications to the market, my audience is not limited to a small scale or used internally, so I always require applications. The web developed by me must always be BOT-friendly to search engines for me to have a better SEO basis.

Previously, when I approached Single Apps such as Reactjs or Vuejs, Angular, I always looked for their frameworks to be able to server-side rendering. The html code must be presented in the most specific way, making it easy for the Search Engine BOT to read.

Of course, when developing rails apps, you don’t need to worry about this issue, but in the minimum standards of SEO, in addition to the deep concepts in SEO, your website must ensure the basic structure. Good to help the BOT understand the content it is crawling is easy, support Google to index the content in the best way.

Why Website need SEO standards?

As you can understand, almost every website today comes from:

  1. Search (That is your website appears when users search for keywords on search engines, then the user clicks to view)
  2. Direct (That means the user they remember your Domain and type directly in the address to enter)
  3. Referral (They access your website from links on other websites pointing to)
  4. Social (They access your website from links shared on social networks)
  5. Mail (They access your website from the links in Mail)

And according to statistics, most of the website traffic comes from Search or the founders of those websites always want to find ways to boost the sources of traffic to the website through Search. And of course SEO is the way to achieve this.

To be able to understand a little more, you can refer to this analysis!

Hence, if you are building a website and want to popularize it on the internet. These are the basic steps you should take from the very beginning for your website


In knowledge of SEO, it is extremely wide and has many different factions and front lines. For a website, article to rank high on search engines (such as Google, Yahoo, or ping), it requires many different techniques, can not be answered with 1 or 2 basic questions. However, there are requests that have become Google’s Offical Documents that most people exposed to SEO know and implement. In this article will mention a few of them, it starts with the website creator, the structure of that website.

Steps to take from the start to help Rails app have a standard SEO structure

1. Create a friendly URL structure for the Rails app

Needless to say, Link structure is an important part of the website, each Link is like a path. And the link should be fixed from the beginning, never with the same content, but there are 2 different links.


A URL with ID:

And 1 URL like this:

Clearly, the following URL is what you need to aim for in order to do it. Because it will always be more search engine friendly and better for SEO, is a plus for your Website because the URL also shows what the LINK content will have. And in my personal experience, the URL should not be too long, the shorter the better, but it must show enough meaning.

To do this, at application development, you should save a field for the URL later.

For example slug, render them from title. And later instead of find_by id: params

Share the news now

Source : Viblo