DEV Community

Jakub
Jakub

Posted on

SEO fixes for Lovable apps — sitemap, meta, canonical, and the stuff Google actually needs

Your Lovable app is fast and pretty. Google still can't find it. Here's the fix list.

I run Inithouse, a portfolio of about 14 micro-SaaS products — all built with Lovable. After shipping the first few, I noticed the same pattern: great product, zero organic traffic. The apps worked fine for users who had the link, but Google was basically ignoring them.

It took some digging to figure out why. Lovable gives you a solid React SPA out of the box, but SPAs and search engines have a complicated relationship. Here's everything I learned fixing SEO across projects like Živá Fotka (AI photo animation), Be Recommended (AI visibility tool), and Vibe Codéři (a Czech vibecoding portal).

The core problem: React SPAs are invisible by default

When Googlebot hits a Lovable app, it sees a mostly-empty HTML shell. The content loads via JavaScript, and while Google claims to render JS, the reality is inconsistent. Some pages get indexed, others don't, and you have no idea why.

The fix isn't one thing — it's a checklist of small wins that add up.

1. Generate a real sitemap from your database

Lovable apps typically store content in Supabase. Your blog posts, product pages, landing pages — they all live in the database, but there's no sitemap telling Google about them.

The fix: create a Supabase Edge Function (or a Lovable Cloud function) that queries your content tables and returns a proper XML sitemap.

The key parts:

  • Query all published pages/posts from your Supabase tables
  • Build XML with <url>, <loc>, <lastmod>, and <changefreq> tags
  • Set the response Content-Type to application/xml
  • Add the sitemap URL to your robots.txt

One gotcha I ran into: if you're using Supabase RLS (Row Level Security), make sure your Edge Function has the right permissions to read published content. I've had sitemaps return empty because the function was hitting RLS policies meant for authenticated users.

After deploying the sitemap, submit it in Google Search Console. Don't just wait for Google to discover it — go to Sitemaps in GSC and submit the full URL manually.

2. Dynamic meta tags with a useSEO hook

Out of the box, Lovable apps ship with a single set of meta tags in index.html. Every page has the same title, description, and OG image. Google sees that as thin content — dozens of URLs with identical metadata.

The fix: create a useSEO custom hook that updates document metadata per page.

What the hook should handle:

  • document.title — unique per page
  • Meta description — via document.querySelector('meta[name="description"]')
  • Open Graph tags (og:title, og:description, og:image, og:url)
  • Twitter card tags
  • Canonical URL (more on this below)

Call the hook at the top of every page component with page-specific values. For blog posts, pull the title and description from your Supabase data.

The important thing: these changes happen client-side, so they only help with Google's JS rendering. For social media previews (Twitter, LinkedIn, Slack), you need server-side rendering or a prerender service. I've had mixed luck with prerender.io — it works, but adds latency. For most MVPs, client-side meta tags plus a good default OG image is enough to start.

3. Canonical URLs for multi-domain setups

This one bit me hard. Živá Fotka runs on five domains (CZ, SK, PL, EN, DE) from a single codebase. Without canonical tags, Google was treating them as duplicate content and picking winners randomly.

The fix: set a <link rel="canonical"> tag that points to the primary URL for each piece of content.

Rules I follow:

  • Each domain's homepage canonical points to itself
  • Shared content (like the main app page) canonicals point to the primary domain
  • Blog posts canonical to whichever domain they were originally published on
  • Use absolute URLs, never relative

In the useSEO hook, I add canonical handling:

useEffect(() => {
  let link = document.querySelector('link[rel="canonical"]');
  if (!link) {
    link = document.createElement('link');
    link.setAttribute('rel', 'canonical');
    document.head.appendChild(link);
  }
  link.setAttribute('href', canonicalUrl);
}, [canonicalUrl]);
Enter fullscreen mode Exit fullscreen mode

For multi-domain setups, also add hreflang tags pointing to each language version. This tells Google which version to show in which country.

4. JSON-LD structured data

Google loves structured data. For a micro-SaaS, the most useful schemas are:

  • WebApplication — for the main product page
  • Article or BlogPosting — for blog posts
  • FAQPage — if you have an FAQ section
  • Organization — for your company info

I inject JSON-LD in the same useSEO hook using a script tag with type="application/ld+json". The trick is to clean up old script tags when the component unmounts, otherwise you end up with duplicate structured data.

5. Pre-launch SEO checklist

Before submitting any Lovable app to Google Search Console, I run through this:

  • robots.txt exists and doesn't block important paths
  • Sitemap is generated, accessible, and submitted to GSC
  • Every page has a unique title and meta description
  • Canonical URLs are set on all pages
  • OG tags are present (test with opengraph.xyz)
  • JSON-LD validates (test with Google's Rich Results Test)
  • No broken internal links
  • Images have alt text
  • Page loads under 3 seconds on mobile (Lovable apps are usually fast here)
  • noindex isn't accidentally set anywhere

The results

After applying these fixes across our portfolio at Inithouse, the difference was measurable within weeks. Pages that were completely invisible started showing up in search. Here We Ask went from zero indexed pages to full coverage after the sitemap fix alone.

The reality is that Lovable handles the hard parts of building a product — UI, database, auth, hosting. But SEO is still something you need to wire up yourself. The good news: once you've done it for one project, the pattern is the same for every new one.

If you're building with Lovable and struggling with organic traffic, start with the sitemap and meta tags. Those two fixes alone will get you 80% of the way there.


I'm Jakub, building Inithouse — a portfolio of AI-powered micro-SaaS products, all shipped with Lovable. Follow along for more builder notes.

Top comments (0)