Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add canonical url to pages #10903

Closed
tobi-or-not-tobi opened this issue Jan 27, 2021 · 3 comments · Fixed by #10914
Closed

Add canonical url to pages #10903

tobi-or-not-tobi opened this issue Jan 27, 2021 · 3 comments · Fixed by #10914
Assignees
Milestone

Comments

@tobi-or-not-tobi
Copy link
Contributor

The SeoMetaService generates specific meta tags to the DOM that can be used by crawlers to index the page. So far, canonical URLs have not been implemented. With this ticket we create canonical URLs in the SeoMetaService and introduce page meta providers for some of the pages to provide the canonical page

@tobi-or-not-tobi tobi-or-not-tobi self-assigned this Jan 27, 2021
@tobi-or-not-tobi tobi-or-not-tobi added this to To Do in MISC (Blamed) via automation Jan 27, 2021
@tobi-or-not-tobi tobi-or-not-tobi moved this from To Do to In Progress in MISC (Blamed) Jan 27, 2021
@tobi-or-not-tobi tobi-or-not-tobi moved this from In Progress to Code Review & Local QA in MISC (Blamed) Feb 1, 2021
tobi-or-not-tobi added a commit that referenced this issue Mar 20, 2021
Add a canonicalUrlResolver and default implementation that is configurable. The configuration options contain:

- fall back to https
- add `www` subdomain
- remove (specific) query parameters
- add trailing slash

The resolver is called for content, product, category and search pages.

The canonical URL resolver is not enabled by default in the 3.x releases as it's considered a breaking change.

closes #10903, closes #6483
@tobi-or-not-tobi
Copy link
Contributor Author

QA:

  • enable the canonical URL
  • load a page
  • confirm that the canonical URL is created on SSR
  • or enable it for CSR
  • test various options:
    • enable/disable forceHttps
    • enable/disable forceWww
    • enable/disable removeQueryParams
    • enable/disable forceTrailingSlash
  • test different pages
  • test variant pages

@tobi-or-not-tobi tobi-or-not-tobi moved this from Code Review & Local QA to QA from Server Post-Merge in MISC (Blamed) Mar 20, 2021
@tobi-or-not-tobi tobi-or-not-tobi added this to the 3.2 milestone Mar 20, 2021
@KateChuen
Copy link
Contributor

Tested on develop branch (local), pointing to 2011 backend (dev 9 server).

  • Tested with CSR disabled

  • Tested with CSR enabled

    • Tested with forceHttps, forceWww, removeQueryParams, forceTrailingSlash false
      Screen Shot 2021-09-29 at 10 50 18 AM
    • Tested with forceHttps, forceWww, removeQueryParams, forceTrailingSlash true
      Screen Shot 2021-09-29 at 10 50 47 AM
  • Tested different pages
    Screen Shot 2021-09-29 at 10 42 35 AM
    Screen Shot 2021-09-29 at 10 30 46 AM
    Screen Shot 2021-09-29 at 10 30 21 AM
    Screen Shot 2021-09-29 at 10 30 05 AM
    Screen Shot 2021-09-29 at 10 29 48 AM
    Screen Shot 2021-09-29 at 10 29 23 AM
    Screen Shot 2021-09-29 at 10 44 35 AM
    Screen Shot 2021-09-29 at 10 43 37 AM

@KateChuen
Copy link
Contributor

Tested on ssr on dev9 server
Screen Shot 2021-09-30 at 9 52 21 AM

@KateChuen KateChuen moved this from QA from Server Post-Merge to Done in MISC (Blamed) Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
MISC (Blamed)
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants