AI SEO Advisor adds an SEO Reports tab to node pages in Backdrop CMS. The module performs local, rules-based checks (title length, meta description, word count, headings, internal links, image alt text, etc.) and depends on the contrib ai module to produce AI suggestions. A configured AI provider is required for AI-driven features.
For site administrators, AI SEO Advisor provides on-page recommendations that include AI-powered suggestions (titles, descriptions, keywords, prioritized tips) tailored to configurable Report Types. The module never auto-applies changes — all AI output is advisory only.
- Rules-based SEO checks with tunable thresholds and per-check weights (config stored in
ai_seo_advisor.settings). - AI suggestions via the contrib
aimodule usingai_chat()— any configured AI provider works. - Report Types: named analysis profiles with custom prompts, managed at
admin/config/ai/ai-seo/report-types. - Saved reports: each analysis run is stored as an
ai_seo_reportentity, viewable and deletable from the SEO tab. - AJAX Analyze button on the SEO tab (
node/%node/ai-seo). - Optional custom system prompt and
log_ai_inputdebug toggle in settings.
- Place
ai_seo_advisorin your Backdropmodulesdirectory. - Enable the module via Admin -> Modules or with Drush.
- Configure the module at Admin -> Configuration -> AI -> AI SEO Advisor (
admin/config/ai/ai-seo). - Install and configure the contrib
aimodule with at least one AI provider and API key. - Enable the module on the desired content types using the "Enable on these content types" setting.
- Optionally create Report Types at
admin/config/ai/ai-seo/report-typesto customize the AI analysis prompt.
- Backdrop CMS 1.x
- PHP 8.2 or later
- The contrib
aimodule with at least one configured provider and API key. - Entity Plus
- DOMDocument (PHP ext-dom) is used when available; regex fallbacks handle HTML parsing in constrained environments.
- Settings form:
ai_seo_advisor_settings_form()inai_seo_advisor.admin.inc— controls enabled content types, AI model, custom system prompt, andlog_ai_input. - Settings storage:
ai_seo_advisor.settings(Backdrop config API). - Admin path:
admin/config/ai/ai-seo(settings) andadmin/config/ai/ai-seo/report-types(report types). - Main logic functions:
ai_seo_advisor_analyze()inai_seo_advisor.reports.inc— rules engine, returns score, status, and per-check results.ai_seo_advisor_generate_ai_suggestions()inai_seo_advisor.reports.inc— sends content to AI viaai_chat(), returns structured suggestions.ai_seo_advisor_analyze_form()inai_seo_advisor.pages.inc— AJAX form on the SEO tab.ai_seo_advisor_reports_page()inai_seo_advisor.pages.inc— renders saved reports list on the SEO tab.
- AI calls are gated by
module_exists('ai'). Rules-only checks run regardless. - AI integration uses
ai_chat()from the contribaimodule — no provider-specific class is called directly. - Report Types drive the AI prompt per analysis run. A fallback prompt is used when no report type is selected.
- Max tokens for AI calls are hardcoded at 3000 (matches Drupal ai_seo module behavior).
- Parsing strategy: prefer
DOMDocumentwhere available, with regex fallbacks.
- Do not enable
log_ai_inputon production sites — it may log sanitized content containing private information. Enable only on development when troubleshooting. - AI features send (sanitized) content to the configured AI provider endpoint. Ensure you have an appropriate privacy policy and user consent before enabling on production.
- Install this module using the official Backdrop CMS instructions.
Bugs and feature requests should be reported in the Issue Queue.
Inspired by the AI SEO Analyzer module in Drupal.
- Developed with AI assistance.
This project is GPL v2 software. See the LICENSE.txt file in this directory for complete text.