Generating sitemap best practices with Rails app?

Hello Alex, Wondering what's your recommendation when it comes to sitemap with rails? like using a generator tool such as "" or by using a gem?. Also, right now when I Google baserails it comes up as the first option on google. So what's the magic behind this; is it the sitemap? or meta description and site ranking..... Thank :)

Posted over 6 years ago by MO. H.
Posted over 6 years ago by Alex Yang

Great question. I remember I tried using the sitemap_generator gem (, but in the end, I may have just created the BaseRails sitemap by hand (because we don't want Google indexing subscriber-only content). We only have a handful of static pages in front of the paywall anyway.

Honestly, I'm not an expert at this (I've only been forced to learn what I need to know), but I recommend using if you're looking for a simple approach. Use the sitemap_generator gem if you want to have more control over a custom configuration. The latter takes more time to set up, but it's also more powerful. Hope that helps!