
SEO Domains
SEO Domains adds extra domains and subdomains for the site, with import from XLSX and automatic addition to Yandex Webmaster.
Features
- Manage extra domains and subdomains (site.ru, spb.site.ru, astana.site.kz, site.by, brest.site.by)
- Change content per resource for each domain/subdomain
- Quick copy of any domain
- Manage extra fields per domain
- Import domains and extra fields from XLSX
- Add and verify ownership in Yandex Webmaster
- Auto-fetch address coordinates
- User city selection

Usage example
To add a domain go to Applications -> Cities and domains, click Add, fill in the fields

To add an extra field for a domain, go to Additional fields tab, click Add, enter the key (available via placeholder, e.g. [[!+sd.price_1]]) and other fields.

Placeholders
[[!+sd.domain]]— Domain[[!+sd.city]]— City[[!+sd.city_r]]— City (declension)[[!+sd.phone]]— Phone[[!+sd.email]]— E-mail[[!+sd.address]]— Address[[!+sd.address_full]]— Full address[[!+sd.coordinats]]— Coordinates
Content per resource per city
After installation each resource has a new "Cities and domains" tab.
Table with all cities and their content

Example adding content for a city

After adding content the content placeholder is replaced with the correct content based on the domain.
City selection on site
Call snippet SeoDomainsList where needed.
Full parameter example
[[SeoDomainsList?
&tpl=`SeoDomains.City.tpl`
&sortby=`city`
&sortdir=`ASC`
&activeClass=`active`
&limit=`10`
&showLog=`0`
]]{'SeoDomainsList' | snippet: [
'tpl' => 'SeoDomains.City.tpl',
'sortby' => 'city',
'sortdir' => 'ASC',
'activeClass' => 'active',
'limit' => 10,
'showLog' => 0,
]}
Adding site to Yandex Webmaster
Register an app at https://oauth.yandex.ru/, select "Adding sites to Yandex Webmaster, getting indexing status". After getting ID, go to https://oauth.yandex.ru/authorize?response_type=token&client_id=ID, copy token and save it in app settings under key seodomains_token.
Domain management via MODX admin
Add a wildcard subdomain to Site aliases (e.g. *.seodomains.tyrsyna.ru). Non-existent domains redirect to the main domain from settings (seodomains_main_host).

Component settings
seodomains_city_fields— Table fieldsseodomains_cyrillic_domain— Set Yes for Cyrillic domainsseodomains_html_parent— Parent of HTML resources for domain verificationseodomains_main_host— Main hostseodomains_phx_prefix— Placeholder prefixseodomains_token— Yandex OAuth token
FAQ
Where is the xlsx import example?
Example is in assets/components/seodomains/import
How to add extra fields via XLSX?
Open the example in assets/components/seodomains/import, find Additional fields row, insert JSON array:
[
{"name":"Your field name (optional)","key":"Your extra field key","value":"Its value"},
{"name":"Your 2nd field name (optional)","key":"Your 2nd extra field key","value":"Its value"}
]