[SOLVED] Multisite Configuration Sitemap.xml

Hi,

we are running into a few issues/problems using Neos Multisite capabilities with SEO sitemap.xml configuration. Currently we are using this Package: https://github.com/jonnitto/Jonnitto.Sitemap @jonnitto which works great for a 1 site setup. But doesn´t work for us on a Multisite Setup.

Our current settings.yaml looks like this:

Neos:
 Form:
presets:
  bootstrap:
    title: 'Twitter bootstrap'
    parentPreset: default
    formElementTypes:
      'Neos.Form:Base':
        renderingOptions:
          translationPackage: 'de.arcosystem'
      'Neos.Form:FormElement':
        properties:
          elementClassAttribute: form-control
      'Neos.Form:MultiLineText':
        properties:
          elementClassAttribute: form-control
ContentRepository:
contentDimensions:
  'language':
    label: 'Language'
    icon: icon-language
    default: 'de'
    defaultPreset: 'de'
    resolution:
      mode: 'uriPathSegment'
    detectionComponent:
      implementationClassName: 'de\arcosystem\Http\ContentDimensionDetection\LanguageDimensionPresetDetector'
    presets:
      'de':
        label: 'Deutsch'
        values: ['de']
        uriSegment: 'de'
        defaultTld: 'de'
        constraints:
          country:
            'de': true
            'at': true
            'ch': true
            '*': false
      'fr':
        label: 'French'
        values: ['fr','de']
        uriSegment: 'fr'
        defaultTld: 'fr'
        constraints:
          country:
            'de': true
            'ch': true
            'at': true
            'fr': true
            '*': false
      'en':
        label: 'Englisch'
        values: ['en']
        uriSegment: 'en'
        defaultTld: 'com'
        constraints:
          country:
            'de': true
            'at': true
            'ch': true
            'fr': true
            'en': true
            'lt': false
            'si': true
            'cz': true
            '*': false
      'si':
        label: 'Slowenisch'
        values: ['si']
        uriSegment: 'si'
        defaultTld: 'si'
        constraints:
          country:
            'si': true
            '*': false
      'cz':
        label: 'Tschechisch'
        values: ['cz','en']
        uriSegment: 'cz'
        defaultTld: 'cz'
        constraints:
          country:
            'cz': true
            '*': false
      'lt':
        label: 'Litauisch'
        values: ['lt']
        uriSegment: 'lt'
        defaultTld: 'lt'
        constraints:
          country:
            'lt': true
            '*': false
  'country':
    default: 'ch'
    defaultPreset: 'ch'
    label: 'Country'
    icon: 'icon-globe'
    resolution:
      mode: 'topLevelDomain'
    presets:
      'uk':
        label: 'United Kingdom'
        values: ['uk']
        resolutionValue: 'uk'
      'de':
        label: 'Germany'
        values: ['de']
        resolutionValue: 'de'
      'ch':
        label: 'Switzerland'
        values: ['ch','de','at']
        resolutionValue: 'ch'
      'at':
        label: 'Austria'
        values: ['at']
        resolutionValue: 'at'
      'fr':
        label: 'France'
        values: ['fr']
        resolutionValue: 'fr'
      'us':
        label: 'United States'
        values: ['us']
        resolutionValue: 'com'
      'si':
        label: 'Slowenien'
        values: ['si']
        resolutionValue: 'si'
      'lt':
        label: 'Litauen'
        values: ['lt']
        resolutionValue: 'lt'
      'cz':
        label: 'Czech Republic'
        values: ['cz']
        resolutionValue: 'cz'

How to configure a sitemap.xml per language/country?

And the second question how to setup the sitemap.xml tto show all language URL´s? Because currently it is just showing the main language version /de but we need all language URL´s. Any idea how to do that?

Example:

mydomain.de/de
mydomain.de/en
mydomain.de/cz

thanks

Hi Andre
Do you have the urls where I could look at the generated xml?

In this file https://github.com/jonnitto/Jonnitto.Sitemap/blob/master/Resources/Private/Fusion/XmlSitemap/UrlSet.fusion the configuration from Settings.yaml gets loaded into the @context.configuration

So you could probably set different configuration for the different sites.

In the Readme is a description of how to set up the dynamic robots.txt:

If you set up your page like this, you will get a generated robots.txt with all the different sitemaps. Like that the search engines will find all your corresponding sitemaps:

User-agent: *
Disallow: /neos/

Sitemap: http://www.domain.tld/de/sitemap.xml
Sitemap: http://www.domain.tld/fr/sitemap.xml
Sitemap: http://www.domain.tld/it/sitemap.xml
Sitemap: http://www.domain.tld/en/sitemap.xml

Sitemap: http://www.domain.tld/de_AT/sitemap.xml
Sitemap: http://www.domain.tld/en_AT/sitemap.xml

Sitemap: http://www.domain.tld/de_int/sitemap.xml
Sitemap: http://www.domain.tld/fr_int/sitemap.xml
Sitemap: http://www.domain.tld/it_int/sitemap.xml
Sitemap: http://www.domain.tld/en_int/sitemap.xml

If you only want to render a subset of the available language dimensions (e.g., if the content is not yet ready) you can configure this in the Settings.yaml:

Jonnitto:
  Sitemap:
    robotsTxt:
      # Activate only English and German
      dimensionsPresets: ['en','de']
2 Likes

Hi Jon,

we tested everything and it works perfect now.

thanks for your fast help!

Great to hear! Can you then prefix the title of your post with “[SOLVED]”, that would be helpful :slight_smile: