Setup Guide
Install the backend package, add 4 lines of config, drop in 2 frontend components.
Prerequisites
Two commands — one for your Next.js frontend, one for your .NET backend.
# Frontend (Next.js) npm install @altiusseo/next # Backend (.NET) dotnet add package AltiusSEO.Core
Add 3 lines to Program.cs and a connection string to appsettings.json.
using AltiusSEO.Core.Extensions;
builder.Services.AddAltiusSEO(options => {
options.ConnectionString = builder.Configuration.GetConnectionString("Default");
options.SiteId = "my-site";
options.LicenseKey = ""; // leave empty for free tier
});
// Auto-creates 11 database tables on first run
app.UseAltiusSEODatabase();
// Registers all API endpoints
app.MapAltiusSEO(); // /api/seo/*
app.MapAltiusSEOAdmin(); // /api/admin/seo/*{
"ConnectionStrings": {
"Default": "Server=(localdb)\\mssqllocaldb;Database=MyApp_SEO;Trusted_Connection=True;TrustServerCertificate=True;"
}
}Create a client provider and add it to your root layout. The SEOTracker is invisible — it auto-tracks page views.
'use client';
import { SEOProvider, SEOTracker } from '@altiusseo/next';
export function Providers({ children }: { children: React.ReactNode }) {
return (
<SEOProvider apiUrl="/api/seo" siteId="my-site">
{children}
<SEOTracker />
</SEOProvider>
);
}import { Providers } from './providers';
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
<Providers>{children}</Providers>
</body>
</html>
);
}Use SEOHead for meta tags and any schema component for structured data.
'use client';
import { SEOHead, ArticleSchema } from '@altiusseo/next';
export default function BlogPost({ post }) {
return (
<>
<SEOHead
title={post.title}
description={post.excerpt}
ogImage={post.coverImage}
canonical={`https://mysite.com/blog/${post.slug}`}
/>
<ArticleSchema
headline={post.title}
author={post.author}
datePublished={post.date}
/>
<article>{post.content}</article>
</>
);
}Drop the dashboard into any admin route and visit it immediately.
'use client';
import { SEODashboard } from '@altiusseo/next';
export default function SEOAdmin() {
return <SEODashboard />;
}Visit /admin/seo — you now have a 20-tab SEO panel with analytics, sitemap management, robots.txt editor, and more.
Handle 301/302 redirects automatically at the Next.js edge before your pages load.
import { NextResponse } from 'next/server';
import type { NextRequest } from 'next/server';
import { createAltiusSEOMiddleware } from '@altiusseo/next/middleware';
const seoMiddleware = createAltiusSEOMiddleware({
apiUrl: process.env.NEXT_PUBLIC_API_URL || '/api/seo',
siteId: 'my-site',
});
export async function middleware(request: NextRequest) {
const seoResponse = await seoMiddleware(request);
if (seoResponse) return seoResponse;
return NextResponse.next();
}The full configuration reference is in our docs, or ask us directly.