Content SEO
Content SEO is where you can configure each Section, Category Group and Commerce Product Type that has public URLs.
A list of these content types includes status indicators identifying what’s been configured for each one:
SEOmatic allows you to have different Content SEO settings on both a per-site and per-Entry Type basis.
Click the name of any listed item to edit its settings.
Settings are unique for each type!
Unlike the previous Global SEO section, the settings below each correspond with a specific Content SEO section or entry type you’ve chosen.
General Settings
This is where you can set up the fields from which SEOmatic extracts the SEO Title, SEO Description, and SEO Image. These per-section Content SEO settings, when they have values, will override the Global SEO general settings.
Twitter Settings
By default, Twitter settings will mirror what you set in the General section, but you can customize them to your heart’s content.
Facebook Settings
Facebook settings will also mirror what you set in the General section, but you can customize them here.
Sitemap Settings
SEOmatic automatically creates a sitemap index for each of your Site Groups. This sitemap index points to individual sitemaps for each of your Sections, Category Groups, and Commerce Product Types.
Instead of one massive sitemap that must be updated any time anything changes, only the sitemap for the Section, Category Group, or Commerce Product Type will be updated when something changes in it.
Additionally, sitemaps are paginated according to the Sitemap Page Size setting (which defaults to 500
per page), to allow for a large number of entries in the sitemaps without hurting performance.
SEOmatic can automatically include files such as .pdf
, .xls
, .doc
and other indexable file types in Asset fields or Asset fields in matrix or Neo blocks.
In addition, SEOmatic can automatically create Image sitemaps and Video sitemaps from images & videos in Asset fields or Asset fields in matrix or Neo blocks.
Search engines no longer accept sitemap pings for content updates, but rather will re-crawl your sitemaps on a regular basis to find new pages.
Sitemap Generation
SEOmatic generates sitemaps on demand when requested on the frontend, and then caches the sitemap for future requests so they are fast.
SEOmatic will automatically invalidate the cache for a sitemap for a Section, Category Group, or Product any time you save an element.
Because SEOmatic now paginates sitemaps, they are no longer generated via lengthy queue jobs, and the CLI command to regenerate them:
./craft seomatic/sitemap/generate
...has been deprecated as well.
Additional Sitemaps
If you have custom sitemaps that are not in the CMS, you can manually add them to their own Sitemap Index via Site Settings → Sitemap.
You can also add to it via plugin:
use nystudio107\seomatic\events\RegisterSitemapsEvent;
use nystudio107\seomatic\models\SitemapIndexTemplate;
use yii\base\Event;
Event::on(
SitemapIndexTemplate::class,
SitemapIndexTemplate::EVENT_REGISTER_SITEMAPS,
function(RegisterSitemapsEvent $event) {
$event->sitemaps[] = [
'loc' => $url,
'lastmod' => $lastMod,
];
}
);
Additional Sitemap URLs
If you have custom URLs that are not in the CMS, you can manually add them to their own Sitemap Index via Site Settings → Sitemap.
You can also add to it via a plugin:
use nystudio107\seomatic\events\RegisterSitemapUrlsEvent;
use nystudio107\seomatic\models\SitemapCustomTemplate;
use yii\base\Event;
Event::on(
SitemapCustomTemplate::class,
SitemapCustomTemplate::EVENT_REGISTER_SITEMAP_URLS,
function(RegisterSitemapUrlsEvent $event) {
$event->sitemaps[] = [
'loc' => $url,
'changefreq' => $changeFreq,
'priority' => $priority,
'lastmod' => $lastMod,
];
}
);