Google Antigravity Directory

The #1 directory for Google Antigravity prompts, rules, workflows & MCP servers. Optimized for Gemini 3 agentic development.

Resources

PromptsMCP ServersAntigravity RulesGEMINI.md GuideBest Practices

Company

Submit PromptAntigravityAI.directory

Popular Prompts

Next.js 14 App RouterReact TypeScriptTypeScript AdvancedFastAPI GuideDocker Best Practices

Legal

Privacy PolicyTerms of ServiceContact Us
Featured on FazierFeatured on WayfindioAntigravity AI - Featured on Startup FameFeatured on Wired BusinessFeatured on Twelve ToolsListed on Turbo0Featured on findly.toolsFeatured on Aura++That App ShowAI ToolzShinyLaunchMillion Dot HomepageSolver ToolsFeatured on FazierFeatured on WayfindioAntigravity AI - Featured on Startup FameFeatured on Wired BusinessFeatured on Twelve ToolsListed on Turbo0Featured on findly.toolsFeatured on Aura++That App ShowAI ToolzShinyLaunchMillion Dot HomepageSolver Tools

© 2026 Antigravity AI Directory. All rights reserved.

The #1 directory for Google Antigravity IDE

This website is not affiliated with, endorsed by, or associated with Google LLC. "Google" and "Gemini" are trademarks of Google LLC.

Antigravity AI Directory
PromptsMCPBest PracticesUse CasesLearn
Home
Prompts
SEO Optimization Complete Guide

SEO Optimization Complete Guide

Implement comprehensive SEO for Google Antigravity with sitemaps, structured data, and meta optimization.

seositemapstructured-datameta
by antigravity-team
⭐0Stars
.antigravity
# SEO Optimization for Google Antigravity

Implement comprehensive SEO with sitemaps, structured data, and meta optimization.

## Dynamic Metadata

```typescript
// app/layout.tsx
import { Metadata } from "next";

export const metadata: Metadata = {
    metadataBase: new URL("https://yoursite.com"),
    title: { default: "Your Site", template: "%s | Your Site" },
    description: "Your site description",
    keywords: ["keyword1", "keyword2"],
    authors: [{ name: "Your Name" }],
    creator: "Your Name",
    openGraph: { type: "website", locale: "en_US", url: "https://yoursite.com", siteName: "Your Site", images: [{ url: "/og-image.png", width: 1200, height: 630 }] },
    twitter: { card: "summary_large_image", creator: "@yourhandle" },
    robots: { index: true, follow: true, googleBot: { index: true, follow: true, "max-video-preview": -1, "max-image-preview": "large", "max-snippet": -1 } },
    verification: { google: "your-verification-code" },
};
```

## Dynamic Sitemap

```typescript
// app/sitemap.ts
import { MetadataRoute } from "next";
import { createClient } from "@/lib/supabase/server";

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
    const supabase = createClient();
    const baseUrl = "https://yoursite.com";

    // Fetch dynamic content
    const { data: posts } = await supabase.from("posts").select("slug, updated_at").eq("published", true);
    const { data: categories } = await supabase.from("categories").select("slug");

    const staticPages = [
        { url: baseUrl, lastModified: new Date(), changeFrequency: "daily" as const, priority: 1 },
        { url: `${baseUrl}/about`, lastModified: new Date(), changeFrequency: "monthly" as const, priority: 0.8 },
        { url: `${baseUrl}/contact`, lastModified: new Date(), changeFrequency: "monthly" as const, priority: 0.5 },
    ];

    const postPages = posts?.map((post) => ({
        url: `${baseUrl}/posts/${post.slug}`,
        lastModified: new Date(post.updated_at),
        changeFrequency: "weekly" as const,
        priority: 0.7,
    })) || [];

    const categoryPages = categories?.map((cat) => ({
        url: `${baseUrl}/categories/${cat.slug}`,
        lastModified: new Date(),
        changeFrequency: "weekly" as const,
        priority: 0.6,
    })) || [];

    return [...staticPages, ...postPages, ...categoryPages];
}
```

## Robots.txt

```typescript
// app/robots.ts
import { MetadataRoute } from "next";

export default function robots(): MetadataRoute.Robots {
    return {
        rules: [
            { userAgent: "*", allow: "/", disallow: ["/admin/", "/api/", "/private/"] },
            { userAgent: "Googlebot", allow: "/" },
        ],
        sitemap: "https://yoursite.com/sitemap.xml",
    };
}
```

## Structured Data Components

```typescript
// components/seo/StructuredData.tsx
export function WebsiteSchema() {
    const schema = {
        "@context": "https://schema.org",
        "@type": "WebSite",
        name: "Your Site",
        url: "https://yoursite.com",
        potentialAction: { "@type": "SearchAction", target: "https://yoursite.com/search?q={search_term_string}", "query-input": "required name=search_term_string" },
    };
    return <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }} />;
}

export function OrganizationSchema() {
    const schema = {
        "@context": "https://schema.org",
        "@type": "Organization",
        name: "Your Company",
        url: "https://yoursite.com",
        logo: "https://yoursite.com/logo.png",
        sameAs: ["https://twitter.com/yourhandle", "https://github.com/yourorg"],
    };
    return <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }} />;
}

export function BreadcrumbSchema({ items }: { items: { name: string; url: string }[] }) {
    const schema = {
        "@context": "https://schema.org",
        "@type": "BreadcrumbList",
        itemListElement: items.map((item, index) => ({
            "@type": "ListItem",
            position: index + 1,
            name: item.name,
            item: item.url,
        })),
    };
    return <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }} />;
}
```

## Canonical URLs

```typescript
// app/posts/[slug]/page.tsx
import { Metadata } from "next";

export async function generateMetadata({ params }: { params: { slug: string } }): Promise<Metadata> {
    const canonicalUrl = `https://yoursite.com/posts/${params.slug}`;
    return {
        alternates: { canonical: canonicalUrl },
    };
}
```

## SEO Audit Script

```typescript
// scripts/seo-audit.ts
import { createClient } from "@supabase/supabase-js";

const supabase = createClient(process.env.SUPABASE_URL!, process.env.SUPABASE_SERVICE_ROLE_KEY!);

async function auditSEO() {
    const { data: posts } = await supabase.from("posts").select("id, slug, title, description, content");

    const issues: { slug: string; issue: string }[] = [];

    posts?.forEach((post) => {
        if (!post.title || post.title.length < 30) issues.push({ slug: post.slug, issue: "Title too short (< 30 chars)" });
        if (post.title && post.title.length > 60) issues.push({ slug: post.slug, issue: "Title too long (> 60 chars)" });
        if (!post.description) issues.push({ slug: post.slug, issue: "Missing meta description" });
        if (post.description && post.description.length > 160) issues.push({ slug: post.slug, issue: "Description too long (> 160 chars)" });
        if (!post.content || post.content.length < 300) issues.push({ slug: post.slug, issue: "Content too short (< 300 chars)" });
    });

    console.log("SEO Audit Results:");
    console.table(issues);
}

auditSEO();
```

## Performance Optimization

```typescript
// next.config.js
module.exports = {
    images: { formats: ["image/avif", "image/webp"], deviceSizes: [640, 750, 828, 1080, 1200, 1920] },
    compress: true,
    poweredByHeader: false,
    async headers() {
        return [
            { source: "/(.*)", headers: [
                { key: "X-DNS-Prefetch-Control", value: "on" },
                { key: "X-Content-Type-Options", value: "nosniff" },
            ]},
        ];
    },
};
```

## Best Practices

1. **Unique Titles**: Each page should have a unique, descriptive title
2. **Meta Descriptions**: Write compelling descriptions under 160 chars
3. **Structured Data**: Add relevant schema markup
4. **Internal Linking**: Link between related content
5. **Performance**: Optimize Core Web Vitals

When to Use This Prompt

This seo prompt is ideal for developers working on:

  • seo applications requiring modern best practices and optimal performance
  • Projects that need production-ready seo code with proper error handling
  • Teams looking to standardize their seo development workflow
  • Developers wanting to learn industry-standard seo patterns and techniques

By using this prompt, you can save hours of manual coding and ensure best practices are followed from the start. It's particularly valuable for teams looking to maintain consistency across their seo implementations.

How to Use

  1. Copy the prompt - Click the copy button above to copy the entire prompt to your clipboard
  2. Paste into your AI assistant - Use with Claude, ChatGPT, Cursor, or any AI coding tool
  3. Customize as needed - Adjust the prompt based on your specific requirements
  4. Review the output - Always review generated code for security and correctness
💡 Pro Tip: For best results, provide context about your project structure and any specific constraints or preferences you have.

Best Practices

  • ✓ Always review generated code for security vulnerabilities before deploying
  • ✓ Test the seo code in a development environment first
  • ✓ Customize the prompt output to match your project's coding standards
  • ✓ Keep your AI assistant's context window in mind for complex requirements
  • ✓ Version control your prompts alongside your code for reproducibility

Frequently Asked Questions

Can I use this seo prompt commercially?

Yes! All prompts on Antigravity AI Directory are free to use for both personal and commercial projects. No attribution required, though it's always appreciated.

Which AI assistants work best with this prompt?

This prompt works excellently with Claude, ChatGPT, Cursor, GitHub Copilot, and other modern AI coding assistants. For best results, use models with large context windows.

How do I customize this prompt for my specific needs?

You can modify the prompt by adding specific requirements, constraints, or preferences. For seo projects, consider mentioning your framework version, coding style, and any specific libraries you're using.

Related Prompts

💬 Comments

Loading comments...