Menu
Feedback
Known issues
Canonical tag on custom pages
Marketing & Merchandising
•
ID:
Backlog
Published on12/24/2017
•
Last updated on12/22/2022
1 min read

Summary

The canonical tag on custom pages, from the second level onwards, directs only to the first level.

Example:

The folder /institutional, directly in the site's root, will have the canonical tag pointed correctly to www.website.com/institucional.

The folder /institucional/our-stores, being a subfolder, will have the canonical tag pointed incorrectly to www.website.com/institutional, while it should point to www.website.com/institucional/our-stores.

Simulation

  • Enter the CMS;
  • In Layout, create any two folders, one contained within the other;
  • Associate HTML templates so you'll have content;
  • Access the page on the store's front end;
  • Check the canonical tag that was printed in the second folder of the hierarchy.

Workaround

Because it is a customized content, the best way to get around this problem is to disable the canonical tag using the following control: <vtex.cmc:canonicalPage disable="true"/>. Then manually create the canonical tag for each page.

Suggestion: Use placeholders in the template to have a settings field in each layout/folder that uses these templates.

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX Community
Join our community
Request VTEX support
For personalized assistance, contact our experts
Open a support ticket
GitHubDeveloper PortalCommunityFeedback