SEO

SaaSInMinutes includes built-in SEO optimization. This guide shows you how to optimize your pages for search engines.

Page metadata

Add metadata to your pages using Next.js metadata API:

app/page.tsx
1import { Metadata } from 'next';
2
3export const metadata: Metadata = {
4  title: 'My SaaS - Home',
5  description: 'Launch your SaaS in 30 minutes with SaaSInMinutes',
6  keywords: ['SaaS', 'Next.js', 'Boilerplate'],
7  openGraph: {
8    title: 'My SaaS - Home',
9    description: 'Launch your SaaS in 30 minutes',
10    images: ['/og-image.png'],
11  },
12  twitter: {
13    card: 'summary_large_image',
14    title: 'My SaaS - Home',
15    description: 'Launch your SaaS in 30 minutes',
16    images: ['/og-image.png'],
17  },
18};
19
20export default function HomePage() {
21  return <div>Home</div>;
22}

Structured data

Add structured data (JSON-LD) to your pages:

app/product/page.tsx
1export default function ProductPage() {
2  const structuredData = {
3    '@context': 'https://schema.org',
4    '@type': 'Product',
5    name: 'My SaaS',
6    description: 'Launch your SaaS in 30 minutes',
7    offers: {
8      '@type': 'Offer',
9      price: '199',
10      priceCurrency: 'USD',
11    },
12  };
13
14  return (
15    <>
16      <script
17        type="application/ld+json"
18        dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}
19      />
20      <div>Product page</div>
21    </>
22  );
23}

Sitemap

Create a sitemap for your site:

app/sitemap.ts
1import { MetadataRoute } from 'next';
2
3export default function sitemap(): MetadataRoute.Sitemap {
4  return [
5    {
6      url: 'https://yoursaas.com',
7      lastModified: new Date(),
8      changeFrequency: 'yearly',
9      priority: 1,
10    },
11    {
12      url: 'https://yoursaas.com/about',
13      lastModified: new Date(),
14      changeFrequency: 'monthly',
15      priority: 0.8,
16    },
17  ];
18}

Robots.txt

app/robots.ts
1import { MetadataRoute } from 'next';
2
3export default function robots(): MetadataRoute.Robots {
4  return {
5    rules: {
6      userAgent: '*',
7      allow: '/',
8      disallow: '/private/',
9    },
10    sitemap: 'https://yoursaas.com/sitemap.xml',
11  };
12}

Best practices

  • Use descriptive, unique titles for each page
  • Write compelling meta descriptions (150-160 characters)
  • Add alt text to all images
  • Use semantic HTML (header, nav, main, footer)
  • Optimize images (WebP format, lazy loading)
  • Use proper heading hierarchy (h1, h2, h3)
  • Add structured data for rich snippets
  • Create a sitemap and robots.txt