[Skip to main content](#vessel-content)

#   Canonical URL and Multi-domain

##

- **[paulo25ci](/forum/user/47563-paulo25ci "View paulo25ci's Profile")**
- [![paulo25ci's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/47563-paulo25ci "View paulo25ci's Profile") Topic Author
- [ Offline](/forum/user/47563-paulo25ci)

Less More

- Posts: 20
- Thank you received: 0
-
-

9 years 8 months ago -  9 years 8 months ago [\#265160](#265160) by [paulo25ci](/forum/user/47563-paulo25ci "View paulo25ci's Profile")  *[Canonical URL and Multi-domain](/forum/26-product-category-display/889380-canonical-url-and-multi-domain#265160 "-- url of the page with the problem -- :   hivoox.com  -- HikaShop version -- : HikaShop Busin 3.0.1 -- Joomla version -- : Joomla! 3.6.5 Stable -- PHP version -- : 5.6.28  Hello,  We have several domains, pointed at a single joomla installation. We use the &quot;Language domains plugin&quot; to manage the multi-domain, and all work fine.    www.domain.com  (Main domain)   www.domain.fr    www.domain.pt  Hika shop and hikamarket work correctly, except that the canonical URLs of the products. When we activate &quot;Use the canonical URL if specified&quot; , the system only considers the main domain, and this causes 404 errors.  Example: Product : MON PRODUIT Url: domain.fr/monurlproduit.html URL canonical: monurlproduit  When customer clic to this product, he is redirected to domain.com/monurlproduit.html While he had to stay on domain.fr ( domain.fr/monurlproduit.html).  Do you have any solution to help us solve this problem?")* was created by *[paulo25ci](/forum/user/47563-paulo25ci "View paulo25ci's Profile")*

-- url of the page with the problem -- : [ hivoox.com](https://hivoox.com)
-- HikaShop version -- : HikaShop Busin 3.0.1
-- Joomla version -- : Joomla! 3.6.5 Stable
-- PHP version -- : 5.6.28

Hello,

We have several domains, pointed at a single joomla installation.
We use the "Language domains plugin" to manage the multi-domain, and all work fine.

[ www.domain.com](http://www.domain.com) (Main domain)
[ www.domain.fr](http://www.domain.fr)
[ www.domain.pt](http://www.domain.pt)

Hika shop and hikamarket work correctly, except that the canonical URLs of the products. When we activate **"Use the canonical URL if specified"** , the system only considers the main domain, and this causes 404 errors.

**Example:**
Product : MON PRODUIT
Url: domain.fr/monurlproduit.html
URL canonical: monurlproduit

When customer clic to this product, he is redirected to domain.com/monurlproduit.html
While he had to stay on domain.fr ( domain.fr/monurlproduit.html).

Do you have any solution to help us solve this problem?

Last edit: 9 years 8 months ago by [paulo25ci](/forum/user/47563-paulo25ci "View paulo25ci's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODkzODAtY2Fub25pY2FsLXVybC1hbmQtbXVsdGktZG9tYWluP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

9 years 8 months ago [\#265211](#265211) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Canonical URL and Multi-domain](/forum/26-product-category-display/889380-canonical-url-and-multi-domain#265211 "-- url of the page with the problem -- :   hivoox.com  -- HikaShop version -- : HikaShop Busin 3.0.1 -- Joomla version -- : Joomla! 3.6.5 Stable -- PHP version -- : 5.6.28  Hello,  We have several domains, pointed at a single joomla installation. We use the &quot;Language domains plugin&quot; to manage the multi-domain, and all work fine.    www.domain.com  (Main domain)   www.domain.fr    www.domain.pt  Hika shop and hikamarket work correctly, except that the canonical URLs of the products. When we activate &quot;Use the canonical URL if specified&quot; , the system only considers the main domain, and this causes 404 errors.  Example: Product : MON PRODUIT Url: domain.fr/monurlproduit.html URL canonical: monurlproduit  When customer clic to this product, he is redirected to domain.com/monurlproduit.html While he had to stay on domain.fr ( domain.fr/monurlproduit.html).  Do you have any solution to help us solve this problem?")*

Hi,

First, I see two canonical URLs on your product pages.
So you should fix that.
One must come from HikaShop (the one you specified in the product), the other, another extension.

Second, a canonical URL with just the alias of the product is not normally valid.
You should normally have the menu item alias in the URL, unless the menu item is the homepage, but it doesn't seem that your home page is a products/categories listing menu item.
So actually, even domain.com/virtual-number-algeria should result in a 404.
It works but I don't know why. You must have done something else you didn't say in order to have that to work, and what you did is probably done only for the main website and not the other domains.
But it's hard to say much more.
One thing is sure: HikaShop doesn't change the domain name for the canonical URL.
If you are on the .pt website, the canonical URL will be with .pt domain name.
HikaShop adds the domain name to the text you specify in the canonical URL field by asking Joomla what the current domain name is. It does that by calling the function JURI::base() of the Joomla API which returns the current domain name:
[ docs.joomla.org/API15:JURI/base](https://docs.joomla.org/API15:JURI/base)
That's unless there is some other extension messing with the URLs in some way.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODkzODAtY2Fub25pY2FsLXVybC1hbmQtbXVsdGktZG9tYWluP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[paulo25ci](/forum/user/47563-paulo25ci "View paulo25ci's Profile")**
- [![paulo25ci's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/47563-paulo25ci "View paulo25ci's Profile") Topic Author
- [ Offline](/forum/user/47563-paulo25ci)

Less More

- Posts: 20
- Thank you received: 0
-
-

9 years 6 months ago [\#269926](#269926) by [paulo25ci](/forum/user/47563-paulo25ci "View paulo25ci's Profile")  Replied by *[paulo25ci](/forum/user/47563-paulo25ci "View paulo25ci's Profile")* on topic *[Canonical URL and Multi-domain](/forum/26-product-category-display/889380-canonical-url-and-multi-domain#269926 "-- url of the page with the problem -- :   hivoox.com  -- HikaShop version -- : HikaShop Busin 3.0.1 -- Joomla version -- : Joomla! 3.6.5 Stable -- PHP version -- : 5.6.28  Hello,  We have several domains, pointed at a single joomla installation. We use the &quot;Language domains plugin&quot; to manage the multi-domain, and all work fine.    www.domain.com  (Main domain)   www.domain.fr    www.domain.pt  Hika shop and hikamarket work correctly, except that the canonical URLs of the products. When we activate &quot;Use the canonical URL if specified&quot; , the system only considers the main domain, and this causes 404 errors.  Example: Product : MON PRODUIT Url: domain.fr/monurlproduit.html URL canonical: monurlproduit  When customer clic to this product, he is redirected to domain.com/monurlproduit.html While he had to stay on domain.fr ( domain.fr/monurlproduit.html).  Do you have any solution to help us solve this problem?")*

Hello Nicolas,

We still have the same issue.
We have erased all canonical url from products page, and activate "Use the canonical URL if specified", and get always
404 error.

When we clic to the product : domain.fr/monurlproduit.html).
We are redirect to domain.com/monurlproduit.html
And thats cause 404 error.

This problem occour only whith hikashop. Never with other components.

Joomla! 3.6.5
Hikashop
HikaShop Business: 3.0.1
HikaMarket Multivendor: 1.7.2
HikaAuction: 2.0.0

Need your help please, because our site is in production.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODkzODAtY2Fub25pY2FsLXVybC1hbmQtbXVsdGktZG9tYWluP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86583
- Thank you received: 14324
-
-

9 years 6 months ago [\#269931](#269931) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Canonical URL and Multi-domain](/forum/26-product-category-display/889380-canonical-url-and-multi-domain#269931 "-- url of the page with the problem -- :   hivoox.com  -- HikaShop version -- : HikaShop Busin 3.0.1 -- Joomla version -- : Joomla! 3.6.5 Stable -- PHP version -- : 5.6.28  Hello,  We have several domains, pointed at a single joomla installation. We use the &quot;Language domains plugin&quot; to manage the multi-domain, and all work fine.    www.domain.com  (Main domain)   www.domain.fr    www.domain.pt  Hika shop and hikamarket work correctly, except that the canonical URLs of the products. When we activate &quot;Use the canonical URL if specified&quot; , the system only considers the main domain, and this causes 404 errors.  Example: Product : MON PRODUIT Url: domain.fr/monurlproduit.html URL canonical: monurlproduit  When customer clic to this product, he is redirected to domain.com/monurlproduit.html While he had to stay on domain.fr ( domain.fr/monurlproduit.html).  Do you have any solution to help us solve this problem?")*

Hi,

As I said, it's not HikaShop which does that.
Please make sure that the live_site setting of your configuration.php is empty or always contains the URL of the current domain name.
Please also check your .htaccess as to not have redirects on the different domain names.
Finally, check the other extensions you have. The first thign to check here are the system plugins. Try deactivating them one by one and refresh the cache and access the homepage and try the process again each time to see if it solves the problem until you the plugin causing that issue if any.
These are only guesses of the most probable things I could think of.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84ODkzODAtY2Fub25pY2FsLXVybC1hbmQtbXVsdGktZG9tYWluP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.088 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
