Missing protocol http or https in the canonical url

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 years ago
Hi

NOP 4.40.3
In the canonical tag it is missing the protocol https for example.

<link rel=canonical content=www.domain.com/xxx itemprop=url>
instead of
<link rel=canonical content=https://www.domain.com/xxx itemprop=url>

When missing the protocol it is consider that it is http.
So all pages https will have a different canonical url compared with the real one. Not good for SEO.
It will be pointing to http instead of https

Best
Jose
2 years ago
Hi Jose,

When you enable canonical URLs (admin area > configuration > settings >general settings), the appropriate link tag is generated with a protocol (http or https). So it works fine out of the box.

You can check it here. The last parameter inserts the current protocol.
2 years ago
Hi
If you browse the source code of https://www.bacchusexpress.com/planalto-white-wine it is missing the https.

why is it happening?
where he gets the http from?

Best
Jose
2 years ago
refresh wrote:
Hi
If you browse the source code of https://www.bacchusexpress.com/planalto-white-wine it is missing the https.

why is it happening?
where he gets the http from?

Best
Jose

my one is working fine. please clear your browser cache
2 years ago
I am talking about the canonical url in the source code

https://www.dropbox.com/s/i86vl9qftvce4so/print.png
2 years ago
it works fine out of the box. Please check your \Views\Product\ProductTemplate.Simple.cshtml file. It should have a valid code for canonical URL generation

P.S. If you're using a custom theme, then check at \Themes\{ThemeName}\\Views\Product\ProductTemplate.Simple.cshtml
2 years ago
Hi

I realized that i have 2 in the page source

The one without the https is the first one from structure data. And i believe i should have only one or at least they should have the same url.

<link rel=canonical content=www.bacchusexpress.com/planalto-white-wine itemprop=url>
<link rel=canonical href=https://www.bacchusexpress.com/planalto-white-wine>

Where can i review structure data. All in themes?

Best
Jose
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.