ArtisanPack UI
DocsSEOAdvanced Overview

Advanced Overview

SEO v1.8.1

This section covers advanced features of ArtisanPack UI SEO, including URL redirects, XML sitemaps, robots.txt management, SEO analysis, and caching...

This section covers advanced features of ArtisanPack UI SEO, including URL redirects, XML sitemaps, robots.txt management, SEO analysis, and caching strategies.

Features

URL Redirects

Manage URL redirects with support for exact matching, regex patterns, and wildcards. Track redirect hits and prevent redirect loops.

Learn more about URL Redirects →

XML Sitemaps

Generate comprehensive XML sitemaps including standard sitemaps, image sitemaps, video sitemaps, and news sitemaps. Automatic sitemap index generation for large sites.

Learn more about XML Sitemaps →

Dynamic Robots.txt

Generate robots.txt dynamically with global rules, bot-specific directives, and automatic sitemap inclusion.

Learn more about Robots.txt →

SEO Analysis

Analyze content for SEO quality with 8 built-in analyzers covering readability, keyword density, meta tags, headings, and more.

Learn more about SEO Analysis →

Caching

Optimize performance with comprehensive caching for meta tags, analysis results, redirects, and sitemaps.

Learn more about Caching →

Artisan Commands

Command-line tools for sitemap generation, sitemap submission, and cache management.

Learn more about Artisan Commands →

Frontend Scaffolding (React & Vue)

Publish React or Vue SEO components and TypeScript type definitions to your application for building custom admin interfaces.

Learn more about Frontend Scaffolding →

llms.txt (1.4.0+)

Generate an AI-discovery manifest (llmstxt.org) alongside the XML sitemap.

Learn more about llms.txt →

IndexNow (1.4.0+)

Notify Bing/Yandex/Seznam/Naver of URL changes with a batching submitter that surfaces per-URL rejections.

Learn more about IndexNow →

RSS and Atom Feeds (1.4.0+)

Render RSS 2.0 and Atom 1.0 feeds with sanitized XML output and http-scheme link enforcement.

Learn more about Feeds →

OG Image Generator (1.4.0+)

Deterministically render MightyShare-style social cards to your storage disk.

Learn more about OG Images →

Quick Reference

Enable/Disable Features

// In config/seo.php

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

'sitemap' => [
    'enabled' => true,
],

'robots' => [
    'enabled' => true,
],

'analysis' => [
    'enabled' => true,
],

Feature Check

if (seoIsEnabled('redirects')) {
    // Redirect handling is active
}

if (seoIsEnabled('sitemap')) {
    // Sitemap generation is available
}

Integration Points

Middleware

The package provides middleware for redirect handling:

// In bootstrap/app.php
->withMiddleware(function (Middleware $middleware) {
    $middleware->web(append: [
        \ArtisanPackUI\Seo\Http\Middleware\HandleRedirects::class,
    ]);
})

Routes

The package can register routes for:

  • /sitemap.xml - Main sitemap or sitemap index
  • /sitemap-{page}.xml - Paginated main sitemap (e.g. /sitemap-1.xml)
  • /sitemap-{type}-{page}.xml - Type-specific sitemaps (e.g. /sitemap-post-1.xml)
  • /robots.txt - Dynamic robots.txt
// In config/seo.php
'routes' => [
    'sitemap' => true,
    'robots' => true,
],

Scheduled Tasks

Add sitemap generation to your scheduler:

// In routes/console.php or app/Console/Kernel.php
Schedule::command('seo:generate-sitemap')->daily();
Schedule::command('seo:submit-sitemap')->weekly();

Performance Considerations

Caching Strategy

'cache' => [
    'enabled' => true,
    'driver' => 'redis',  // Use Redis for production
    'ttl' => 3600,        // 1 hour default
],

'sitemap' => [
    'cache' => true,
    'cache_ttl' => 86400, // 24 hours for sitemaps
],

'redirects' => [
    'cache' => true,
    'cache_ttl' => 3600,  // 1 hour for redirects
],

Queue Processing

'analysis' => [
    'queue' => true,  // Run analysis in background
],

Next Steps