question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Canonical URL for prefixed strategy

See original GitHub issue

Is your feature request related to a problem? Please describe.

Currently prefixed strategy generating* index.html for each page which is solely used for redirection does create a duplicate content. It’s not possible without index.html to detect and force redirection.

The problem here is that Google can’t decide which is canonical URLs on it’s own.

It’s now detecting /en as duplicate of / (root) path.

See: https://support.google.com/webmasters/answer/182192?hl=en#3

Describe the solution you’d like

Canonical URL enabled for prefixed strategy as well. It’s only enabled for PREFIX_AND_DEFAULT https://github.com/nuxt-community/i18n-module/blob/master/CHANGELOG.md#features-24

Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:13

github_iconTop GitHub Comments

1reaction
rchlcommented, Oct 13, 2020
1reaction
rchlcommented, Oct 13, 2020

We could probably grab something like this as an example?

I was thinking something more like:

<script>
export default {
  seo() {
    return {
      canonicalQueries: ['param1']
    }
  }
}
</script>

because even if we want to include some query in canonical, we don’t really want to include all but only specific ones.

How can I help? I’m not the great at writing complicated tests but I’ll try my best.

Thanks but I’m on it already.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Canonical URL for prefixed strategy · Issue #912 - GitHub
We don't guarantee that we'll consider the sitemap URLs to be canonical, but it is a simple way of defining canonicals for a...
Read more >
URL Canonicalization and the Canonical Tag | Documentation
A canonical URL is the URL of the page that Google thinks is most representative from a set of duplicate pages on your...
Read more >
Use the Canonical Tag to Boost Traffic and Authority - iloveseo
Want to avoid duplicate content, gain more control over search results and easily track page metrics? Learn to use the rel=canonical tag like...
Read more >
Canonical URLs: Why They Are Important & How to Use Them
Canonical URLs are used to solve duplicate content issues. ... Regional domain prefix: If your website is available in different regions, ...
Read more >
Canonical Tags: Definition and Guideline for 2022 - Holistic SEO
A canonical tag (also known as “rel = canonical”) is a way of telling search engines that a particular URL is the main...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found