Jump to content

Problems with Canonical in website


Erwin007
Go to solution Solved by gizmola,

Recommended Posts

Hi,

I have a website(HTML) where I sell 1 tour in 3 languages.
In the root I have the index.html and tour.html both in English (English is default).
Then there are 2 folders, one folder is ES (Spanish) and one folder DE (German), both have index.html and tour.html with the same contents but in their specific language.

I am trying for some time now to solve these 2 error-messages in Google Search Console:
- Duplicate without user-selected canonical
- Duplicate, Google chose different canonical than user

My question is where and in which page(s) (index or tour) to put  "<link rel="canonical" href="http://www.mywebsite.com/???.html" />"

Thanks for your help.

Edited by Erwin007
Link to comment
Share on other sites

1 hour ago, Erwin007 said:

Hi,

I have a website(HTML) where I sell 1 tour in 3 languages.
In the root I have the index.html and tour.html both in English (English is default).
Then there are 2 folders, one folder is ES (Spanish) and one folder DE (German), both have index.html and tour.html with the same contents but in their specific language.

I am trying for some time now to solve these 2 error-messages in Google Search Console:
- Duplicate without user-selected canonical
- Duplicate, Google chose different canonical than user

My question is where and in which page(s) (index or tour) to put  "<link rel="canonical" href="http://www.mywebsite.com/???.html" />"

Thanks for your help.

I would put it in them all. Just replace the ??? with the file name. But that's me. Maybe contact Google Search Console support and verify?

Link to comment
Share on other sites

  • Solution

It's unclear to me how navigation to the spanish/german versions work, but if there are links you can add rel="canonical" to all the links and that should fix things.

With that said, this issue is covered in their localization documentation:

https://developers.google.com/search/docs/specialty/international/localized-versions

If you have a sitemap file, then follow the instructions for adding entries for each language.

I'm guessing you don't have a sitemap, so an alternative is to add this type of block to the header of each page.  This is very doable for you because you only have 6 pages. (2 pages x 3 languages).

 

This is for example only, copied right out of the google documentation and modified slightly to be closer to what you described, but otherwise what from what I linked for you above:

 

<head>
 <title>Widgets, Inc</title>
  <link rel="alternate" hreflang="en"
       href="https://example.com/index.html" />
  <link rel="alternate" hreflang="de"
       href="https://example.com/de/index.html" />
 <link rel="alternate" hreflang="es"
       href="https://example.com/es/index.html" /> 
 <link rel="alternate" hreflang="x-default"
       href="https://www.example.com/" />
</head>

 

So keep in mind that something similar to this section would go into the header of all the 3 index.html files.  

You will have a different section for the 3 tour.html files, that points to your 3 variations.

Language Codes come from ISO-639-1.  

Country Code come from ISO 3166-1 alpha-2

Since it sounds like this might be a country specific business, you might want your hreflang codes to be:

  • en-GB - English - Great Britain
  • de-DE German - Germany
  • es-ES Spanish - Spain
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.