canonical url = basically wrong (and not only those ..) #1744

Open
opened 2026-10-05 00:55:14 +02:00 by adam · 2 comments
Owner

Currently using Piwigo 14.x I have that: <link rel="canonical" href="/gallery/piwigo/">
But it should be like that: <link rel="canonical" href="https://mygallery.com/gallery/piwigo/">

See: https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls?visit_id=638316025548026739-4151637945&rd=1

What is the reason why this URL (and others) are build like that?

From what I can see, are all URLs wrong (for example template modus with plugin Media Icon) :

<link rel="shortcut icon" type="image/x-icon" href="themes/default/icon/favicon.ico">
<link rel="stylesheet" type="text/css" href="themes/modus/css/open-sans/open-sans.css"> <link rel="stylesheet" type="text/css" href="_data/combined/1sgez2i.css">   <link rel="canonical" href="/gallery/piwigo/"><meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="Startseite">
<link rel="stylesheet" type="text/css" href="./plugins/Media_Icon/template/media_icon.css">
<script type="text/javascript" src="./plugins/ShareAlbum/template/js/clipboard.min.js?v14.0.0beta1"></script>
Currently using Piwigo 14.x I have that: `<link rel="canonical" href="/gallery/piwigo/">` But it should be like that: `<link rel="canonical" href="https://mygallery.com/gallery/piwigo/">` See: https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls?visit_id=638316025548026739-4151637945&rd=1 What is the reason why this URL (and others) are build like that? From what I can see, are all URLs wrong (for example template modus with plugin Media Icon) : ``` <link rel="shortcut icon" type="image/x-icon" href="themes/default/icon/favicon.ico"> <link rel="stylesheet" type="text/css" href="themes/modus/css/open-sans/open-sans.css"> <link rel="stylesheet" type="text/css" href="_data/combined/1sgez2i.css"> <link rel="canonical" href="/gallery/piwigo/"><meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="Startseite"> <link rel="stylesheet" type="text/css" href="./plugins/Media_Icon/template/media_icon.css"> <script type="text/javascript" src="./plugins/ShareAlbum/template/js/clipboard.min.js?v14.0.0beta1"></script> ``` <!-- github-sync-id:1919615763 -->
Author
Owner

Hello
the canonical url with piwigo is when you can copy and paste the entire folder
and you can choose either an ip or ip:port or a domain name
For example in your are installing from /gallery ==> /piwigo

Hello the canonical url with piwigo is when you can copy and paste the entire folder and you can choose either an ip or ip:port or a domain name For example in your are installing from /gallery ==> /piwigo <!-- github-comment-id:1741837288 -->
Author
Owner

I know what a "canonical" URLs should be and what for.
And that's why the current is wrong - in my opinion .. and Google itself:
grafik

I know what a "canonical" URLs should be and what for. And that's why the current is wrong - in my opinion .. and Google itself: ![grafik](https://github.com/Piwigo/Piwigo/assets/1905204/04428476-da01-4cef-85e8-5987a4217296) <!-- github-comment-id:1741995721 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1744