Custom Domain Appearing in Publisher URLs (ETC Mapping?)
In AEM as a Cloud Service (AEMaaCS) setup, I'm noticing that the shortened publisher URLs are showing the ETC-mapped custom domain instead of the default domain (publisher URL).
Is this the expected behavior for AEMaaCS publishers when domain mapping is configured?
If not, could someone guide me on how to resolve or override this behavior?
Any insights or documentation references would be greatly appreciated.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @SRI_VENKATA_SIVA_NAGA_RAJMI
In AEM as a Cloud Service (AEMaaCS) the moment you onboard a custom vanity / apex domain in Cloud Manager, Adobe automatically:
Adds that hostname to the Adobe-managed CDN.
Inserts an auto-generated sling:mapping entry under /etc/map.publish/ (read-only) that maps the repository root “/” to your new host.
Propagates the mapping to every Publish pod.
Because Sling’s ResourceResolver.map(request, path)
and the link-rewriter inside the HTML Library Manager always pick the most specific mapping that matches the incoming Host header, every outbound (shortened) URL produced on Publish now uses the custom domain instead of the default <publisherId>.adobeaemcloud.com
host.
Therefore the behavior you are seeing is the expected and intended behavior for public-facing Publish tiers.
ResourceResolver.map(request…)
externalizer.publishLink(resolver, path)
(or its HTL helper) ignores the Host header and uses the host defined in the OSGi configcom.day.cq.commons.impl.ExternalizerImpl
.
Deploy a publish-only com.day.cq.commons.impl.ExternalizerImpl.cfg.json
under/apps/<proj>/config.prod/publish
:
{
"externalizer.publish": [ "https://<publisherId>.adobeaemcloud.com" ]
}
Then generate links through Externalizer or the HTL xssProtection='uri' @extension='html' @selectors='external'
helpers.
These links will always point to the default domain irrespective of the custom mapping.
Is the behaviour (custom domain in shortened URLs) expected?
Yes. Sling’s auto-generated mapping for the custom domain has higher priority, so Publish uses that host for all outbound links.
Can I disable it?
Not globally. You can: 1 - build links with Externalizer, or 2 - call map(null, path)
, or 3 - add a lower-priority mapping for the default host.
Where do I configure the host used by Externalizer?
/apps/<project>/config.prod/publish/com.day.cq.commons.impl.ExternalizerImpl.cfg.json
Can I edit /etc/map.publish
manually?
No, it is immutable in AEMaaCS. Ship additional mappings via content package if absolutely require.
Reference Article you can check here:
Custom Domain
Thanks
Partyush
Views
Likes
Replies
Views
Likes
Replies