RUBY ON RAILS SEO AUDIT · ERB LAYOUTS · FRIENDLY_ID · AI VISIBILITY
Free Ruby on Rails SEO Audit
Rails server-renders every page via ERB layouts — Googlebot gets the full response on the first request. But layouts missing content_for(:title) overrides, numeric-ID routes instead of slugs, and no sitemap gem scheduled are gaps a generic audit misses without Rails context. DeepSEOAnalysis audits Rails apps with framework-aware guidance.
WHAT WE CHECK
6 Ruby on Rails SEO checks
Beyond the 80+ general checks, the engine applies Rails-aware analysis when it detects a Ruby on Rails application — covering ERB layout metadata inheritance, friendly_id slug routing, sitemap_generator config, and robots.txt setup.
ERB layout metadata coverage
Rails uses layout inheritance — `app/views/layouts/application.html.erb` is the default layout that wraps all views. Per-page metadata is typically set via `content_for` blocks: `<% content_for :title do %>My Page Title<% end %>` in the view, then `<title><%= yield(:title) || "Default Title" %></title>` in the layout. Common gaps: the layout uses a static site-wide title without a `yield(:title)` override, no `<meta name="description">` in the layout at all, or OG tags hardcoded with the homepage values. The `meta-tags` gem provides a cleaner DSL. The audit checks every crawled page for a unique, present title tag and meta description — flagging pages sharing the same layout default.
Slug routing and friendly URLs
Rails's default `resources :posts` generates routes using numeric IDs: `/posts/142`. These URLs provide no keyword signal and are less readable in search results. The `friendly_id` gem converts them to slug-based URLs: `/posts/my-post-title`. Without it, you'd need to override `to_param` manually. Common routing SEO gaps: numeric-ID routes for content-heavy models, pagination appended as `?page=2` without canonical handling (use `canonical_link_tag` with `params.except(:page)`), and API or admin namespaces accessible without robots.txt protection. The audit checks URL patterns and flags parameter-heavy, non-canonical structures.
sitemap_generator gem
`sitemap_generator` is the standard Rails sitemap gem. Without it, no sitemap exists and Googlebot must discover pages through crawling alone. Common gaps after installation: the `sitemap:refresh` rake task isn't scheduled (so the sitemap is perpetually stale), draft or soft-deleted records are included via unscoped queries, `lastmod` isn't set to `record.updated_at` (losing freshness signals), and the sitemap URL isn't referenced in `public/robots.txt` via a `Sitemap:` directive. The audit checks sitemap presence, Sitemap directive in robots.txt, and whether the sitemap reflects live published content.
robots.txt and AI crawler access
Rails serves a static `public/robots.txt` that ships with a minimal placeholder by default. This default allows all crawlers to access everything — including `/rails/info`, admin routes, and any API namespaces that shouldn't be indexed. Common gaps: admin and API routes not disallowed, staging environments left publicly accessible, or AI crawlers (GPTBot, ClaudeBot, PerplexityBot) accidentally blocked by overly broad rules. The audit checks all major AI crawler user-agents and flags any that are blocked, along with any sensitive route patterns that should be disallowed.
Server-rendered view advantages
Rails renders pages server-side via ERB, Haml, or Slim templates — every HTTP response is complete HTML in the first request. Googlebot receives full page content, metadata, and structured data without any JavaScript rendering delay. This is Rails's fundamental SEO advantage over client-rendered JavaScript SPAs: no two-wave rendering, no hydration, no risk of content being invisible to crawlers that don't execute JavaScript. The audit verifies that pages are genuinely server-rendered and flags any controllers using `render json:` or Hotwire Turbo frames that defer primary page content to secondary requests not present in the initial HTML response.
AI visibility for Rails apps
Rails makes AI visibility straightforward: `public/llms.txt` is served at `/llms.txt` as a static file; FAQPage JSON-LD is added as a shared partial (`<%= render "shared/faq_schema", faqs: @faqs %>`) included in page layouts or individual views; Article JSON-LD for blog posts goes in the show action's view. The `schema-dot-org` gem provides a Ruby-native API for emitting JSON-LD. The audit checks all five AI visibility signals — llms.txt presence, AI crawler access, FAQPage/HowTo schema, question-heading ratio, and content chunkability — with specific partial names, gem references, and `public/` file paths for each fix.
HOW IT WORKS
Audit your Rails app in 60 seconds
- Enter your Rails app URL. Works with any Rails deployment: Heroku, Fly.io, Render, Railway, Hatchbox, bare-metal with Puma + nginx, or AWS/GCP. No source code, ERB templates, or Rails console access needed — the audit crawls the live site.
- We crawl and analyse. The engine crawls up to 50 pages (free) or 1,000 pages (paid), checks metadata coverage across all controller actions, validates JSON-LD structured data, measures CrUX Core Web Vitals from real user data, and evaluates all five AI visibility signals.
- You get a prioritised report. Rails-aware issues first — ERB layout metadata gaps, numeric-ID routing, missing sitemap gem, blocked AI crawlers — then general SEO, each with the specific view partial, route config, or Gemfile addition to fix it.
FAQ
Questions about the Rails SEO audit
Does DeepSEOAnalysis detect Ruby on Rails SEO issues?
Yes. The engine detects Rails signals — server-rendered ERB/Haml views, Ruby URL routing patterns, and Rails's public/ directory structure — and surfaces framework-specific guidance alongside the 80+ general checks.
Is Ruby on Rails good for SEO?
Rails is excellent for SEO in its default configuration: it renders complete HTML server-side via ERB (or Haml/Slim) layouts, so Googlebot receives full page content on the first request with no JavaScript rendering step. All content, metadata, and structured data are in the initial HTTP response. The common Rails SEO gaps are configuration: application layout missing `content_for(:title)` overrides on individual pages, routes using numeric `:id` instead of `:slug` via `friendly_id`, the `sitemap_generator` gem not installed or not scheduled, and AI crawlers accidentally blocked in robots.txt.
How do I generate a sitemap in a Rails app?
The `sitemap_generator` gem is the Rails standard. After installing: `SitemapGenerator::Sitemap.default_host = "https://yoursite.com"` in `config/sitemap.rb`; then define your routes: `add posts_path` and `Post.find_each { |p| add post_path(p), lastmod: p.updated_at }`. Generate with `rails sitemap:refresh`. Schedule it in a Cron job or Heroku Scheduler to keep it fresh. The audit checks sitemap presence, Sitemap directive in robots.txt, and whether published content appears in the generated sitemap.
Is the Rails SEO audit free?
Yes. The complete audit is free with no signup and no email gate. Paid plans add saved history, scheduled monitoring, larger crawls (up to 1,000 pages), and agency workflows.