The PageVariantsProvider OSGi service is capable of generating alternate links for sites belonging to the same family. In order to configure sites to be taken into consideration by the service, a cq:siteVariant node has to be added to the jcr:content node from the root of the site.
The cq:siteVariant node needs to have the following properties:
cq:childNodesMapTo - determines to which attribute of the link element the child nodes will be mapped; it is recommended to organize the content of your website in such a way so that the children of the root node represent the root for a language variant of your global website (e.g. /content/mysite/en, /content/mysite/de), in which case the value of the cq:childNodesMapTo should be hreflang;
cq:variantDomain - indicates what Externalizer domain will be used to generate the page variants absolute URLs; if this value is not set then the page variants will be generated using relative links;
cq:variantFamily - indicates to which family of websites this site belongs; multiple device-specific representations of the same website should belong to the same family;
media - stores the values of the media attribute of the link element; it is recommended to use the name of the BrowserMap registered DeviceGroups, so that the BrowserMap library can automatically forward the clients to the correct variant of the website.
PageVariantsProvider and Externalizer
When the value of the cq:variantDomain property of a cq:siteVariant node is not empty, the PageVariantsProvider service will generate absolute links using this value as a configured domain for the Externalizer service. Make sure to configure the Externalizer service to reflect your setup.