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
DevelopmentBundled 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 ProdFree 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)
ProductionUse 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 / ContainerSpin 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.
| Table | Purpose |
|---|---|
SEO_PageViews | Individual page view records (URL, session, timestamp, device) |
SEO_Sessions | Visitor sessions (start/end, duration, pages visited) |
SEO_AnalyticsEvents | Custom event tracking (clicks, scroll depth, etc.) |
SEO_PageMetas | Per-page SEO meta (title, description, OG, robots) |
SEO_SitemapEntries | XML sitemap URLs with priority and changefreq |
SEO_RobotsTxtRules | Individual robots.txt directives |
SEO_RobotsTxtConfig | Global robots.txt settings (sitemap URL, crawl-delay) |
SEO_RedirectRules | 301/302 redirect rules with hit tracking |
SEO_NotFoundEntries | 404 error log with hit counts |
SEO_SchemaTemplates | JSON-LD schema templates (all 12 types) |
SEO_KeywordAnalyses | Keyword 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.