Skip to content

Add canonical link to PREFIX_AND_DEFAULT duplicated pages#194

Merged
paulgv merged 2 commits intonuxt-modules:masterfrom
Nabellaleen:canonical-link
Jan 20, 2019
Merged

Add canonical link to PREFIX_AND_DEFAULT duplicated pages#194
paulgv merged 2 commits intonuxt-modules:masterfrom
Nabellaleen:canonical-link

Conversation

@Nabellaleen
Copy link
Copy Markdown

When using prefix_and_default strategy, the default language pages have "duplicated routes". For example, if I have a route A/B with en as default language, I will get /en/A/B and /A/B routes.

For SEO, we needs, then, a rel="canonical" link.
This MR add on the /en/A/B route a canonical link to the /A/B route

More info: https://support.google.com/webmasters/answer/182192#dup-content

PS: I tried to add tests, but I've failed to setup tests on multiple nuxt.config.js files :/

@paulgv paulgv merged commit dcd1f79 into nuxt-modules:master Jan 20, 2019
@paulgv
Copy link
Copy Markdown
Collaborator

paulgv commented Jan 20, 2019

Thanks you @Nabellaleen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants