Skip to Content
GuideSEO Utilities

SEO Utilities

Optimize your Orbitus applications for search engines with built-in SEO utilities.

Metadata Generation

Next.js App Router provides a simple way to manage SEO metadata:

import type { Metadata } from 'next'; export const metadata: Metadata = { title: 'My Page', description: 'Page description for search engines', keywords: ['keyword1', 'keyword2'], openGraph: { title: 'My Page', description: 'Page description', url: 'https://example.com/page', siteName: 'My Site', type: 'website', }, }; export default function Page() { return <h1>My Page</h1>; }

Open Graph Tags

Improve how your content appears when shared:

export const metadata: Metadata = { openGraph: { title: 'Article Title', description: 'Article description', images: [ { url: 'https://example.com/image.jpg', width: 1200, height: 630, alt: 'Article image', }, ], }, };

Twitter Cards

Optimize sharing on Twitter:

export const metadata: Metadata = { twitter: { card: 'summary_large_image', title: 'Article Title', description: 'Article description', images: ['https://example.com/image.jpg'], }, };

Structured Data (JSON-LD)

Add rich snippets for better search results:

import { json } from 'next/response'; export default function Article() { const structuredData = { '@context': 'https://schema.org', '@type': 'Article', headline: 'Article Title', description: 'Article description', author: { '@type': 'Person', name: 'Author Name', }, }; return ( <> <script type="application/ld+json"> {JSON.stringify(structuredData)} </script> <article> {/* Article content */} </article> </> ); }

Robots and Sitemaps

Configure robot indexing:

import type { MetadataRoute } from 'next'; export default function robots(): MetadataRoute.Robots { return { rules: { userAgent: '*', allow: '/', disallow: '/private/', }, sitemap: 'https://example.com/sitemap.xml', }; }

Generate a sitemap:

import type { MetadataRoute } from 'next'; export default function sitemap(): MetadataRoute.Sitemap { return [ { url: 'https://example.com', lastModified: new Date(), changeFrequency: 'weekly', priority: 1, }, { url: 'https://example.com/about', lastModified: new Date(), changeFrequency: 'monthly', priority: 0.8, }, ]; }

Best Practices

  1. Use descriptive page titles (50-60 characters)
  2. Write meaningful meta descriptions (150-160 characters)
  3. Use semantic HTML (h1, h2, p, article, etc.)
  4. Optimize images with alt text
  5. Create descriptive URLs
  6. Build a logical site structure
  7. Use structured data for rich snippets
  8. Ensure fast page load times
  9. Make content mobile-friendly
  10. Update content regularly

Tools

Learn More

Last updated on