Menu
Feedback
Start here
Tutorials
Developer portal

Known Issues
Support Rules
Troubleshooting

Frequently Asked Questions
Announcements
Known issues
Canonical tag on custom pages
Canonical tag on custom pages
ID:
Backlog
Published on 12/24/2017
Last update on 12/22/2022

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
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 support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback