Skip to content
  1. Extras
  2. SEO Domains

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

Features

Usage example ​

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

Usage example - 1

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.

Usage example - 2

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 ​

Table with all cities and their content

Example adding content for a city ​

Example adding content

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 ​

modx
[[SeoDomainsList?
  &tpl=`SeoDomains.City.tpl`
  &sortby=`city`
  &sortdir=`ASC`
  &activeClass=`active`
  &limit=`10`
  &showLog=`0`
]]
fenom
{'SeoDomainsList' | snippet: [
  'tpl' => 'SeoDomains.City.tpl',
  'sortby' => 'city',
  'sortdir' => 'ASC',
  'activeClass' => 'active',
  'limit' => 10,
  'showLog' => 0,
]}

Full parameter example

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).

Domain management via MODX admin

Component settings ​

  • seodomains_city_fields — Table fields
  • seodomains_cyrillic_domain — Set Yes for Cyrillic domains
  • seodomains_html_parent — Parent of HTML resources for domain verification
  • seodomains_main_host — Main host
  • seodomains_phx_prefix — Placeholder prefix
  • seodomains_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:

json
[
  {"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"}
]