Getting Started

Database Setup

Altius SEO uses EF Core 9 and supports any SQL Server variant. Tables are auto-created on first run — no migrations to manage.

SQL Server LocalDB

Development

Bundled with Visual Studio. Zero setup for local development.

{
  "ConnectionStrings": {
    "Default": "Server=(localdb)\\mssqllocaldb;Database=MyApp_SEO;Trusted_Connection=True;TrustServerCertificate=True;"
  }
}

Requires: SQL Server LocalDB component (included with VS 2019+ or standalone installer)

SQL Server Express

Staging / Small Prod

Free edition, suitable for most production workloads under 10 GB.

{
  "ConnectionStrings": {
    "Default": "Server=localhost\\SQLEXPRESS;Database=MyApp_SEO;Trusted_Connection=True;TrustServerCertificate=True;"
  }
}

SQL Server (Full / Azure SQL)

Production

Use SQL authentication with a connection string for cloud deployments:

{
  "ConnectionStrings": {
    "Default": "Server=tcp:yourserver.database.windows.net,1433;Database=MyApp_SEO;User ID=youruser;Password=yourpassword;Encrypt=True;TrustServerCertificate=False;"
  }
}

Store credentials in environment variables or Azure Key Vault — never commit them to source control.

Docker SQL Server

CI / Container

Spin up SQL Server locally in a container:

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=YourStr0ngPwd!" \
  -p 1433:1433 --name sqlserver \
  -d mcr.microsoft.com/mssql/server:2022-latest
{
  "ConnectionStrings": {
    "Default": "Server=localhost,1433;Database=MyApp_SEO;User ID=sa;Password=YourStr0ngPwd!;TrustServerCertificate=True;"
  }
}

Auto-created Tables

Calling app.UseAltiusSEODatabase() creates all 11 tables prefixed with SEO_ if they don't already exist.

TablePurpose
SEO_PageViewsIndividual page view records (URL, session, timestamp, device)
SEO_SessionsVisitor sessions (start/end, duration, pages visited)
SEO_AnalyticsEventsCustom event tracking (clicks, scroll depth, etc.)
SEO_PageMetasPer-page SEO meta (title, description, OG, robots)
SEO_SitemapEntriesXML sitemap URLs with priority and changefreq
SEO_RobotsTxtRulesIndividual robots.txt directives
SEO_RobotsTxtConfigGlobal robots.txt settings (sitemap URL, crawl-delay)
SEO_RedirectRules301/302 redirect rules with hit tracking
SEO_NotFoundEntries404 error log with hit counts
SEO_SchemaTemplatesJSON-LD schema templates (all 12 types)
SEO_KeywordAnalysesKeyword density and readability analyses

Schema Migrations

Altius SEO uses EF Core with EnsureCreated — no migration files to manage. When you upgrade to a new version, existing tables are preserved and any new columns are added automatically.

All tables use the SEO_ prefix so they coexist cleanly with your application's own tables in the same database.

Data Retention

Set RetentionDays to automatically purge old analytics data:

builder.Services.AddAltiusSEO(options => {
    options.RetentionDays = 90; // Delete records older than 90 days
});

Default is 365 days. Set to 0 to disable auto-deletion.