Search Engine Optimization
Easily setup your app to rank high on google with search engine optimisation (SEO)
Basic Setup
LightningRails comes with a default SEO setup loaded in the initializers. To rank on your ideal keywords, visit the meta.yml file and modify the values:
These values will appear on every page by default, this is a great start but not ideal. We recommend leaving the default values on your homepage and overriding the variable manually on all the other pages with the following lines:
Pro Tip: For show pages, add instance variables in the meta tags to have them tailored to each instance page. For example, if you have a car shop, interpolate "@car.name" in the meta_title so you start ranking with all the different car brand keywords with just one line! 🏎️
How to rank on Google
To start ranking on Google, create a search console account and submit the new links you wish to rank for. Make sure to link pages between each other for Google spiders to be able to crawl more effectively across your site, if done right, you will send traffic from some of your pages towards the main ones, the ones that transform and make money, it is called a Keyword tree 🌳
Pro Tip: Don't forget to add "skip_before_action :authenticate_user" to all the actions you wish to rank for. If the page is hidden behind an authentication wall google won't be able to access it and won't index it.
Last updated