Configure storage drivers, crawling environments, analytics environments, view composer, and other options in config/advanced-seo.php.
Advanced SEO is configured through config/advanced-seo.php. The config file is automatically published during installation. To publish it manually:
phpartisanvendor:publish--tag=advanced-seo-config
When a feature is disabled in the config, all its associated fields are removed from the blueprints.
Storage Driver
Advanced SEO supports two storage drivers: file and eloquent. The File driver stores data as flat-files alongside your content, while the Eloquent driver stores data in a database using the Statamic Eloquent Driver.
File Driver
The File driver is the default. Data is saved in content/seo, but you can customize the directory:
To switch back to flat-files from Eloquent, run the following command. It will update the config and give you the option to export existing data from the database to flat-files:
Then run the following command. It will set the driver in your config to eloquent, publish and run the database migrations, and give you the option to import existing data from flat-files into the database:
phppleaseseo:switch-to-eloquent
Neither command will delete any existing data from the previous driver. You may clean up old flat-files or database tables yourself once you're satisfied with the migration.
GraphQL
Enable the GraphQL API. See GraphQL for available queries and types.
Statamic's GraphQL API must also be enabled. Refer to the Statamic documentation for setup.
View Composer
Advanced SEO uses a view composer to inject the seo variable into your Antlers and Blade views. This is what makes values like {{ seo:title }} available in your templates. By default, the view composer is applied to all views ('*'). If you want to limit which views receive SEO data:
Social Images
Asset Container
Configure the asset container for social images. Generated images are saved in a social_images directory within the configured container:
Presets
Customize the dimensions of social images:
The open_graph preset defines the generated image size. The twitter_summary and twitter_summary_large_image presets define the dimensions used to resize the shared image for the Twitter meta tags via Glide.
Generator
The generator automatically creates social images from customizable Antlers templates. See Social Images Generator for full setup instructions.
Favicons
The favicons feature renders favicon meta tags from the SVG uploaded in site defaults. You can disable it if you manage favicons yourself:
Crawling
The crawling config controls which environments allow search engine crawling. By default, crawling is only enabled for the production environment:
In all other environments:
The robots meta tag is set to noindex, nofollow
Crawling-related meta tags like canonical and alternate are removed
Sitemap routes are disabled
Sitemaps
Domain-scoped XML sitemaps are generated automatically. See Sitemaps for details.
Analytics
Analytics scripts only render in the configured environments. Defaults to production:
You can also disable individual trackers to remove their section from the site defaults:
Site Verification
Site verification adds Google and Bing verification code fields to the site defaults. Disable it to remove those fields:
Tokens
Register custom token normalizers and value tokens. See Tokens for details.