Dispatcher alert on AEMaaCS - URI not canonical | Community
Skip to main content
daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 2, 2025

Dispatcher alert on AEMaaCS - URI not canonical

  • January 2, 2025
  • 2 replies
  • 1277 views

Hi,

I was wondering what is the purpose behind the Dispatcher log alert "URI not canonical". I see a lot of those log entries every day for different URLs, some of them might be better optimized for SEO, but some also look completely fine to me, like:
- https://www.example.com/es/products
- https://www.example.com/global/fi/privacy-centre/privacy-notices 

Any experience with this? Should it simply be ignored?

 

Thanks,

Daniel

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

B_Sravan
Community Advisor
Community Advisor
January 3, 2025

Hi @daniel-strmecki,

The "URI not canonical" alert in AEMaaCS Dispatcher logs usually means the incoming URL doesn’t match the expected canonical structure defined in the Dispatcher configuration. This can affect SEO, caching, and security, so it’s worth fixing, in my opinion.

Even if URLs like https://www.example.com/es/products or https://www.example.com/global/fi/privacy-centre/privacy-notices It looks fine. Here’s why they might trigger the alert: I am guessing that the trailing slashes or the case sensitivity are expected from the config and if you use prefixes like /es or /global/fi, they may need to follow strict patterns in the rules.

adjust your dispatcher rules, may be have an 301 redirect as permanent (recommended),

RewriteCond %{REQUEST_URI} !^/content/dam RewriteCond %{REQUEST_URI} !^/static RewriteRule ^/(.*[^/])$ /$1/ [R=301,L]


and address the case sensitivity,

RewriteMap lc int:tolower RewriteCond %{REQUEST_URI} [A-Z] RewriteRule ^/(.*)$ ${lc:%1} [R=301,L]

 also, check URL filters if needed,
If you’re still seeing unnecessary alerts, share the exact configurations, and we can figure it out!

-Sravan

daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 3, 2025

Hi @b_sravan,

thanks for the hint, we are actually getting a large number of these warnings, but most of them are for URLs that are not valid and return 404. However, I found some examples that look completely fine and return 200.

As we use Sling Mapping, we don't map the short incoming URL to the long AEM URL (/content/...) on the Dispatcher. Is that expected in this case? We only have a few rewrite rules on Dispatcher, for example, to remove trailing slash and .html suffixes.

 

Thanks,

Daniel

B_Sravan
Community Advisor
Community Advisor
January 3, 2025

Thanks for the update! Regarding Sling Mapping, it's normal for it to route short URLs to longer AEM paths, but it sounds like your current Dispatcher configuration might not be aware of the mapping and could treat URLs that are missing the /content/... path as non-canonical.

In your case, since you're only applying a few rewrite rules like removing trailing slashes and .html suffixes, you might want to ensure that your Dispatcher handles the mapped URLs properly to align with the canonical paths. Here’s what you might consider:

  • Check URL Mappings: Ensure the short URLs (like /es/products) map correctly to their longer /content/paths. This mapping must be reflected in your Dispatcher rules.

  • Rewrite Rules: If necessary, create explicit rewrite rules that capture your short URL structure and map them correctly. If you're not mapping them, a URL with an unmatched structure might get flagged as not canonical.

  • Canonical URL Handling: You might also need to check how your content is linked—ensure the correct canonical URL (/content/...) is defined across your pages.

If you’re already doing this and the warning persists for valid URLs, we might need to explore any advanced caching or pattern mismatches in your existing rules.

- Sravan

kautuk_sahni
Community Manager
Community Manager
January 7, 2025

@daniel-strmecki Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!

Kautuk Sahni
daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 8, 2025

Hi @kautuk_sahni, I am still looking into this, will post an update once its resolved.