Skip to content

SEO Module

Complete on-page and technical SEO toolkit for TAVP CMS. Handles meta tags, structured data, sitemaps, redirects, and content analysis.

Overview

The SEO module provides everything needed for search engine optimization at the CMS level:

  • Meta Tags — Title, description, keywords per content record
  • Open Graph — Facebook/LinkedIn sharing optimization
  • Twitter Cards — Twitter sharing optimization
  • JSON-LD Schemas — Structured data for rich snippets
  • XML Sitemap — Auto-generated, auto-pinged to search engines
  • Robots.txt — Dynamic generation from config
  • RSS Feed — Content syndication
  • Redirect Manager — 301/302 redirects with hit tracking
  • SEO Analyzer — Content scoring with suggestions
  • Social Sharing — Share buttons for major platforms
  • Webmaster Tools — Google/Bing verification
  • Google Analytics — Auto-inject tracking code
  • Outbound Link Tracking — Broken link detection
  • AI Meta Generator — Auto-generate meta from content

Quick Start

SEO is enabled by default in TAVP CMS. No additional setup required.

bash
# Access SEO dashboard
open https://yoursite.com/admin/seo

# View sitemap
open https://yoursite.com/sitemap.xml

# View robots.txt
open https://yoursite.com/robots.txt

# View RSS feed
open https://yoursite.com/feed

Configuration

config/seo.php

php
return [
    'enabled' => true,

    'meta' => [
        'title_suffix' => ' | My Site',
        'separator' => ' | ',
        'description_max' => 160,
        'title_max' => 60,
    ],

    'sitemap' => [
        'enabled' => true,
        'path' => '/sitemap.xml',
        'max_urls' => 50000,
        'cache_ttl' => 3600,
        'ping_google' => true,
        'ping_bing' => true,
    ],

    'robots' => [
        'enabled' => true,
        'path' => '/robots.txt',
        'allow' => ['/'],
        'disallow' => ['/admin', '/api'],
        'sitemap_url' => '/sitemap.xml',
    ],

    'open_graph' => [
        'enabled' => true,
        'default_image' => '',
        'default_type' => 'website',
    ],

    'twitter' => [
        'enabled' => true,
        'card_type' => 'summary_large_image',
        'site_handle' => '@yoursite',
    ],

    'schemas' => [
        'enabled' => true,
        'types' => [
            'page' => 'WebPage',
            'post' => 'Article',
            'product' => 'Product',
        ],
        'organization' => [
            'name' => 'My Company',
            'logo' => 'https://yoursite.com/logo.png',
            'url' => 'https://yoursite.com',
        ],
    ],

    'rss' => [
        'enabled' => true,
        'path' => '/feed',
        'limit' => 20,
    ],

    'webmaster' => [
        'google_verification' => env('GOOGLE_SITE_VERIFICATION'),
        'bing_verification' => env('BING_SITE_VERIFICATION'),
    ],

    'analytics' => [
        'google_analytics_id' => env('GOOGLE_ANALYTICS_ID'),
    ],

    'redirects' => [
        'enabled' => true,
        'ignore_case' => true,
        'track_hits' => true,
    ],

    'analyzer' => [
        'enabled' => true,
        'min_title_length' => 30,
        'max_title_length' => 60,
        'min_description_length' => 120,
        'max_description_length' => 160,
    ],

    'social_sharing' => [
        'enabled' => true,
        'platforms' => ['twitter', 'facebook', 'linkedin', 'whatsapp', 'telegram'],
    ],
];

Admin UI

Dashboard (/admin/seo)

Overview of SEO health:

  • Total SEO meta records
  • Average SEO score
  • Active redirects count
  • Broken links count
  • Sitemap and robots.txt links
  • Ping search engines button

Settings (/admin/seo/settings)

Configure global SEO defaults:

  • Meta title suffix and separator
  • Default OG image
  • Twitter handle
  • Google/Bing verification codes
  • Google Analytics/Tag Manager IDs
  • Organization schema data

Redirects (/admin/seo/redirects)

Manage URL redirects:

  • Add new redirects (from URL, to URL, status code)
  • View redirect list with hit counts
  • Delete redirects
  • Support for 301 (permanent) and 302 (temporary)

Analyzer (/admin/seo/analyzer)

Analyze content SEO quality:

  • Overall score (0-100)
  • Error list (critical issues)
  • Warning list (improvements needed)
  • Suggestion list (optimization tips)
  • Google search preview

Routes

Public Routes

RouteMethodDescription
/sitemap.xmlGETXML sitemap
/robots.txtGETRobots.txt
/feedGETRSS/Atom feed

Admin Routes

RouteMethodDescription
/admin/seoGETSEO dashboard
/admin/seo/settingsGET/POSTSEO settings
/admin/seo/redirectsGET/POSTRedirect manager
/admin/seo/redirects/deletePOSTDelete redirect
/admin/seo/analyzerGETContent analyzer
/admin/seo/pingPOSTPing search engines

JSON-LD Schemas

The schema generator creates structured data for rich snippets:

Article (for posts)

json
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "My Blog Post",
  "description": "Post description",
  "image": "https://yoursite.com/image.jpg",
  "datePublished": "2026-07-11T00:00:00+00:00",
  "dateModified": "2026-07-11T00:00:00+00:00",
  "author": {
    "@type": "Person",
    "name": "Admin"
  }
}

Product

json
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "My Product",
  "description": "Product description",
  "offers": {
    "@type": "Offer",
    "price": "29.99",
    "priceCurrency": "USD"
  }
}
json
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {"@type": "ListItem", "position": 1, "name": "Home", "item": "https://yoursite.com"},
    {"@type": "ListItem", "position": 2, "name": "Blog", "item": "https://yoursite.com/blog"}
  ]
}

SEO Analyzer Scoring

ScoreRatingColor
70-100GoodGreen
40-69Needs improvementYellow
0-39PoorRed

Checks

CheckPointsType
Title missing-30Error
Title too short/long-10Warning
Meta description missing-20Error
Meta description too short/long-10Warning
OG title missing-5Warning
OG image missing-5Suggestion
Canonical URL missing-3Suggestion
Focus keyword not set-5Suggestion
No images in content-3Suggestion
Thin content (<300 words)-10Warning
Keyword density too low/high-5/-10Warning

Database Tables

seo_meta

Stores per-record SEO fields.

ColumnTypeDescription
idbigintPrimary key
content_typevarcharContent type name
content_idbigintContent record ID
meta_titlevarcharSEO title
meta_descriptiontextSEO description
meta_keywordsvarcharComma-separated keywords
og_titlevarcharOpen Graph title
og_descriptiontextOpen Graph description
og_imagevarcharOpen Graph image URL
og_typevarcharOpen Graph type
twitter_titlevarcharTwitter Card title
twitter_descriptiontextTwitter Card description
twitter_imagevarcharTwitter Card image URL
twitter_cardvarcharTwitter Card type
canonical_urlvarcharCanonical URL
robotsvarcharRobots meta directive
schema_typevarcharJSON-LD schema type
schema_datatextCustom schema JSON
seo_scoreintSEO score (0-100)
focus_keywordvarcharTarget keyword

redirects

Stores URL redirect rules.

ColumnTypeDescription
idbigintPrimary key
from_urlvarcharSource URL
to_urlvarcharTarget URL
status_codeintHTTP status (301/302)
is_activebooleanActive flag
is_regexbooleanRegex pattern flag
hitsintHit counter
last_hit_attimestampLast hit time

Tracks outbound links for broken link detection.

ColumnTypeDescription
idbigintPrimary key
content_typevarcharSource content type
content_idbigintSource content ID
urlvarcharOutbound URL
status_codeintHTTP status code
is_brokenbooleanBroken flag
last_checked_attimestampLast check time

Released under the MIT License.