Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add canonical to all pages #244

Open
sigdestad opened this issue Jan 10, 2025 · 0 comments
Open

Add canonical to all pages #244

sigdestad opened this issue Jan 10, 2025 · 0 comments
Assignees

Comments

@sigdestad
Copy link
Member

sigdestad commented Jan 10, 2025

Application should automatically add the meta canonical element to all pages

Background

Site engine renders the same content on URLs with or without trailing slash I.e. developer.enonic.com/docs and developer.enonic.com/docs/. By convention, Enonic's API generate links without trailing slash, which is implicitly also the default format for Enonic URLs.

In cases where multiple variants of links exist, adding canonical information to pages will eliminate duplicate indexes and optimize SEO

Requirements

Metafields should add the canonical tag on all pages, however, when the page ends with /, the canonical link should point to the URL without /.

Example:

NOTE: The described handling is already correctly implemented and rendered for the og:url element

NOTE: If the rendered page is not a content item, behavior should be similar as for the og:url element

App config

In the "General" section, add a new checkbox - hide canonical (default is not checked)
Once set, Metafields app must not set the canonical tag

Content config

  • In the content SEO form, change the "Canonical" label to "Override canonical"

Guillotine

The Headless extension implements a canonical field that contains null, or a content item.
Add new field for the hide canonical general config (like other hide fields).

@sigdestad sigdestad changed the title Add canonical to pages Add canonical to all pages Jan 10, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants