SEO Tab is a MODX Extra that helps you optimize your pages for the best possible performance in search engines, like Google.
- Manage search engine visibility (noindex, nofollow)
- Manage internal search engine behavior
- Manage your Google XML Sitemap(s)
- Manage 301 redirects
- Automatically generate 301 redirects when changing a resource URL
- Freeze URL functionality is moved into the SEO-tab
Simply install it through the top menu Extras > Installer
and search for SEO Tab
. Install it from there. After installing it, it is recommended to clear your MODX cache, through the top menu Manage > Clear Cache
.
First of all: ALWAYS MAKE A BACKUP BEFORE UPDATING! Especially the modx_site_content database table in this case.
Upgrading to 2.0.0 from 1.* is highly recommended, but it does introduce some risks. SEO Tab 1.* stored the 301 redirects into the properties-column of a resource. SEO Tab 2 stores it in a seperate database table. This means a migration is needed. The migration-process is memory-intensive and might take a very long time, so just let it roll until it mentions a finished migration.
Possible problems (and solutions):
- Long migration-process because of many resources and redirects (think of 1000+ resource websites). Not really a problem, but if you have a big site, just plan your update at a low-traffic time, because redirects won't work 100% during the migration.
- A blank page with a 500 error. This usually is because of memory issues. Try to re-run the migration with a lower limit and queryLimit. It is currently set to limit:1000 and queryLimit=100. Try setting it to 500 and 50 in core/components/stercseo/processors/mgr/redirect/migrate.class.php
- If you somehow end up with an unfinished migration and the migration-notice is gone, you can fix it by setting the SystemSetting stercseo.migration_status to 0.
SEO Tab is automatically enabled after install. Don't forget to clear your cache.
You have to manually create a resource within MODX, Template: (empty)
. go to the tab Settings
and set Content Type: XML
, Cachable
and Rich Text
should be ticked off. In the content field, use the following code:
[[!StercSeoSiteMap]]
The sitemap-snippet has multiple (all optional) properties.
Property | Default value | Description |
---|---|---|
contexts | web | Specify one or more contextKey's, separated by a comma. |
allowSymlinks | 0 | Set this to 1 if you want to include symlinks in your sitemap. |
outerTpl | sitemap/outertpl | Refer to a chunk here to change the outer template, which contains rows of rowTpl's (see below). |
rowTpl | sitemap/rowtpl | Refer to a chunk here to change the rowTpl which is repeated for every resource which is included in the sitemap. |
type | Specify a sitemap type to generate a sitemap index page or an images sitemap. Possible values are: index/images. | |
indexOuterTpl | sitemap/index/outertpl | Refer to a chunk here to change the outer template, which contains rows of rowTpl's for the sitemap index. |
indexRowTpl | sitemap/index/rowtpl | Refer to a chunk here to change the rowTpl which is repeated for every sitemap which is included in the index sitemap. |
imagesOuterTpl | sitemap/images/outertpl | Refer to a chunk here to change the outer template, which contains rows of rowTpl's for the images sitemap. |
imagesRowTpl | sitemap/images/rowtpl | Refer to a chunk here to change the rowTpl which is repeated for every resource which is included in the images sitemap which can contain multiple images. |
imageTpl | sitemap/images/imagetpl | Refer to a chunk here to change the imageTpl which is repeated for every image which is included for a resource |
templates | Specify a comma delimited list of template ID's to generate a template specific sitemap for. In order to exclude templates from a sitemap prepend the template ID with an "-". For example: &templates=-1,2,3 |
An example of a sitemap-call with all properties set to a default-value would be:
[[!StercSeoSiteMap? &contexts=`web` &allowSymlinks=`0` &outerTpl=`sitemap/outertpl` &rowTpl=`sitemap/rowtpl`]]
XML Sitemap related system settings
Key | Description |
---|---|
stercseo.xmlsitemap.babel.add_alternate_links | Add alternate links to XML Sitemap based on Babel Translations |
stercseo.xmlsitemap.dependent_ultimateparent | Resources depend on properties of parent/ultimate parent. This enables you to hide resources if their parent/ultimate parent resource is deleted/unpublished. |
In order to create an index sitemap please follow the steps below:
- Create a Google Sitemap page as you would normally do and add the parameter &type=
index
, for example:
[[!StercSeoSiteMap? &type=`index`]]
- Add child resources to the page you just created and add template specific sitemaps usting the parameter &templates=``, for example:
[[!StercSeoSiteMap? &templates=`-1,2,3`]]
Now these template specific templates will show up on your Sitemap index page.
The image sitemap will generate a sitemap of your MODX resources and the images it contains based on the images that are set in:
- Image TV's
- MIGX TV's with a inputTVtype of image (Also works with using MIGX configs)
An image sitemap can be generated by specifing the type to images:
[[!StercSeoSiteMap? &type=`images`]]
Within the tab SEO > Findability
, you can manage three options which determine the robots-tag. If you leave out a robots-tag and do not have a robots.txt in your website-root, the Search engine will use the following robots-tag:
<meta name="robots" content="index, follow">
The settings Include in search engines
and Following links
result in two placeholders which you can add to your template/chunks:
<meta name="robots" content="[[+seoTab.robotsTag]]">
If you set Include in search engines
to no
, it will generate the following HTML:
<meta name="robots" content="noindex">
We greatly value your feedback, feature requests and bug reports. Please issue them on Github.
This is a free extra and the code is publicly available for you to change. The extra is being actively maintained and you're free to put in pull requests which match our roadmap. Please create an issue if the pull request differs from the roadmap so we can make sure we're on the same page.
Need help? Approach our support desk for paid premium support.