T4VN.Seo.Core 1.1.0

dotnet add package T4VN.Seo.Core --version 1.1.0
                    
NuGet\Install-Package T4VN.Seo.Core -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="T4VN.Seo.Core" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="T4VN.Seo.Core" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="T4VN.Seo.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add T4VN.Seo.Core --version 1.1.0
                    
#r "nuget: T4VN.Seo.Core, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package T4VN.Seo.Core@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=T4VN.Seo.Core&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=T4VN.Seo.Core&version=1.1.0
                    
Install as a Cake Tool

T4VN.Seo.Core

NuGet NuGet Downloads License: MIT .NET

Framework-agnostic SEO / page-audit engine for .NET 8, 9 and 10. No Umbraco, no ASP.NET Core hosting dependency — usable from any .NET app (console, Azure Function, CI pipeline, etc.).

What it does

  • Fetch as bot or browser — Googlebot (smartphone / desktop), Bingbot, Chrome, Firefox, Edge. Follows the redirect chain manually so the SSRF guard runs on every hop.
  • SSRF guard — DNS-based; blocks RFC-1918, localhost, .local, CGNAT, link-local, IPv6 ULA/loopback. Re-checked on every redirect hop so a public hostname that resolves to an internal address is still blocked.
  • Full static analysis of the fetched HTML + response headers:
    • On-page SEO — title (length), meta description (length), canonical, H1/H2/H3, noindex, nofollow, lang.
    • Social — Open Graph, Twitter Card, Facebook/Twitter/LinkedIn pixels, Google Analytics, social-profile links.
    • Technical SEO — charset, gzip/br, browser caching, HTTPS, schema.org markup, viewport, favicon, HTML structure.
    • Content — word/paragraph count, Flesch readability, keyword density, thin-content flag.
    • Accessibility — aria-label/aria-describedby, skip-to-content, heading structure, inputs without label.
    • Spam / hidden CSS / JavaScript — hack-injection patterns, eval/document.write/base64 obfuscation.
    • Cloaking — compares bot response vs Chrome response (title, status, content size).
    • Carbon — CO₂e estimate per page view with an A–F rating.
  • Composite SEO score (0–100) — Lighthouse-style weighted checklist; per-category sub-scores (SEO / Technical / Content / Accessibility) and individual check pass/fail with remediation advice. SeoScorer is the single source of truth shared by all consumers.

Installation

dotnet add package T4VN.Seo.Core

Usage

Register in DI

// Program.cs / Startup.cs
services.AddT4VNSeoCore(options =>
{
    options.AllowInternalHosts = false;       // SSRF guard on (recommended)
    options.AllowInvalidCertificates = false; // validate TLS (recommended)
});

Or bind from configuration:

services.Configure<PageAnalysisOptions>(config.GetSection("SeoCore"));
services.AddT4VNSeoCore(); // options already registered above

Fetch and analyse a URL

public class MyService(IUrlViewerService viewer)
{
    public async Task RunAsync(CancellationToken ct)
    {
        var result = await viewer.FetchUrlAsync(new UrlViewerRequest
        {
            Url    = "example.com/page",
            Scheme = "https",
            UserAgent = "googlebot-smartphone",
            Referrer  = "google"
        }, ct);

        Console.WriteLine($"Status:    {result.StatusCode}");
        Console.WriteLine($"SEO score: {result.Analysis.Audit.Score?.Total}/100");
        Console.WriteLine($"Rating:    {result.Analysis.Audit.Score?.Rating}");

        foreach (var check in result.Analysis.Audit.Score?.Checks ?? [])
        {
            var icon = check.Passed ? "✓" : "✗";
            Console.WriteLine($"  {icon} [{check.Category}] {check.Label}" +
                              (check.Passed ? "" : $" — {check.Advice}"));
        }
    }
}

Compute a score from an existing PageAudit

// SeoScorer is static — call it from anywhere, no DI needed.
SeoScore? score = SeoScorer.Compute(myPageAudit);

Configuration

Property Default Description
AllowInternalHosts false Relax SSRF guard (private/local addresses). Dev only.
AllowInvalidCertificates false Accept self-signed / invalid TLS. Dev only.

Key types

Type Namespace Purpose
IUrlViewerService T4VN.Seo.Core.Services Main entry point — fetch + analyse
UrlViewerRequest T4VN.Seo.Core.Models Input: URL, scheme, user agent, referrer
UrlViewerResponse T4VN.Seo.Core.Models Output: redirect chain, headers, HTML, Analysis
ContentAnalysis T4VN.Seo.Core.Models Meta tags, spam, JS issues, cloaking, links, Audit
PageAudit T4VN.Seo.Core.Models Seo / Social / Technical / Content / Accessibility + Score
SeoScore T4VN.Seo.Core.Models Total (0–100), Rating, sub-scores, Checks
SeoScorer T4VN.Seo.Core.Models Static rubric — single source of truth for the score
PrivateHostGuard T4VN.Seo.Core.Services DNS-based SSRF guard (also usable standalone)
PageAnalysisOptions T4VN.Seo.Core AllowInternalHosts, AllowInvalidCertificates
SeoCoreExtensions T4VN.Seo.Core AddT4VNSeoCore(IServiceCollection, ...)

Consumers

This library is the engine behind:

License

MIT — see LICENSE.txt.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on T4VN.Seo.Core:

Package Downloads
uTPro.Feature.UrlViewer

URL Viewer for Umbraco (16, 17, 18): a backoffice tool in the "SEO Audit" section to fetch any URL as Googlebot/Bingbot (or a browser), follow the full redirect chain, view headers and HTML source, and run a static analysis — on-page SEO, Open Graph/Twitter, technical SEO, content and accessibility metrics, spam/hidden-CSS/JavaScript detection and cloaking — with a composite SEO score. Also exposes an authenticated API to fetch a URL and return the analysis as JSON. Server-side and SSRF-safe. Built on the framework-agnostic T4VN.Seo.Core engine. (For the site-wide crawler, install uTPro.Feature.SEOAudit.)

uTPro.Feature.SEOAudit

Site-wide SEO & content audit for Umbraco (16, 17, 18). Crawls every Content & Media URL (plus sitemap.xml), checks for broken links/images/resources, and audits each page for SEO, Open Graph/Twitter, technical SEO, content quality, a static accessibility subset and carbon emissions — with a composite SEO score, a run health score, grouped issues with priority, orphaned/duplicate detection, incremental scans and CSV export, all in a dedicated backoffice section. Runs as a recurring background job (auto-discovered by uTPro Job Monitor). Built on the framework-agnostic T4VN.Seo.Core engine.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 794 7/30/2026
1.0.0 168 7/27/2026

v1.0.0: Initial release. Framework-agnostic SEO/page-audit engine for .NET 8/9/10. Provides IUrlViewerService (fetch-as-bot with SSRF guard), full static analysis (on-page SEO, Open Graph/Twitter, technical SEO, content, accessibility, spam/cloaking/JS detection), SeoScorer (Lighthouse-style composite score 0-100 with per-category sub-scores), PageAnalysisOptions, and SeoCoreExtensions.AddT4VNSeoCore() for any IServiceCollection.