Questions tagged [hreflang]

The hreflang tag is used to signal alternate language versions of the specified URL. This helps search engines like Google to better understand multilingual websites.

Filter by
Sorted by
Tagged with
1
vote
0answers
62 views

Product names are randomly translated in Magento widget

I've implemented a custom product slider in my Magento store. Sometimes the product titles in the slider are in English instead of Dutch on the Dutch storeview. When I empty the cache everything ...
3
votes
3answers
1k views

How to get category URL in multiple stores

I'm trying to generate the href links for our multilingual Magento 2 site, and as the category slug changes, I cannot simply replace the store code in the URL. I've code is given below : $...
1
vote
1answer
559 views

No x-default hreflang implemented (Magento 2.2.4)

This is a mention from a SEO scan. Is there an easy way to implement this?
1
vote
2answers
550 views

Magento2: Need current URL in HTML-head: Scripts and Style Sheets for hreflang

My question is about using Magento2 HTML-head to generate hreflang links. In Admin Content Configuration Store View HTML-Head Scripts & Styles I need the current URL for hreflang. I have tried ...
6
votes
2answers
3k views

Get page URL from current page, different store-view

I'm using different store-views to create different language versions of a shop. Now I'm trying to add links to the other pages. However, I can not find a way to get the actual URL from the other ...
1
vote
1answer
50 views

Exclude storeview in hreflang generation

I use this code for the href language in my head.phtml <?php $website = Mage::app()->getWebsite()->getStores(); foreach ( $website as $store) { $lang = $store->getConfig('general/...
0
votes
1answer
379 views

hreflang multi language with backend URL?

I am adding hreflang-tags to a multi-language Magento store. I found the code below on here and used it in the page header. It does what it's supposed to, but I'm looking for another solution. <?...
0
votes
1answer
825 views

hreflang for 2 storeview with different URL [duplicate]

We have insert this code in the header.phtml to have on all web page: <?php $groupId = Mage::app()->getStore()->getGroupId(); $collection = Mage::getModel('core/store')->...
0
votes
1answer
159 views

Multilingual site. Separate domains. hreflang issues

I'm trying to set up a multi-lingual site for a client but having some issues with conflicting ideas. It's a UK based client selling to the UK and Europe. They'd like to serve different prices for UK ...
1
vote
2answers
616 views

How to add correct hreflang for google like “en-gb” instead of “en_GB”

I have multiple store site in magento. i wanted to add hreflang for my stores and thanks to one of the post here i have managed to do so. the code i wrote in my app / design / frontend / mytheme / ...
2
votes
3answers
2k views

How to remove ?___store= from hreflang url?

<?php foreach (Mage::app()->getWebsites() as $website) { foreach ($website->getGroups() as $group) { $stores = $group->getStores(); foreach ($stores as $store) { ...
1
vote
1answer
56 views

Hreflang php code for getstore instead of getwebsite

I am using the following code to generate the hreflang on my website: <?php $groupId = Mage::app()->getStore()->getGroupId(); $collection = Mage::getModel('core/store')->getCollection()-&...
2
votes
1answer
694 views

hreflang tags for multiple websites?

I have three websites under single magento installation and would like to generate hreflang tags for each websites manually. I used the code mentioned in this question <?php foreach (Mage::app()-&...
3
votes
5answers
5k views

Magento hreflang tags: How to get URL Key per Store View?

I have been trying to add hreflang tags to a multi-language project following the answers to this question. In my setup there is one website, one store and there are three store views (English, German ...
2
votes
1answer
1k views

Different domain for different store view (language)

Is it possible to have different views of my site (for languages / currencies) hosted off different domains for example: www.myshop.co.uk - English (GBP) version of the site www.myshop.ie - English ...
2
votes
1answer
792 views

Add the hreflang in link for each category

i have using the same url for different languages. <reference name="head"> <action method="addLinkRel"> <rel>alternatve</rel> <href>https://www.example....
5
votes
8answers
13k views

How to add hreflang tags (or other meta tags) to pages in magento?

Hi using info from this site and around the web I have started to add hreflang tags to my magento store. They work and display as they should on the default (American)site, however on the alternate (...
1
vote
3answers
3k views

Magento multi store views with rel=“alternate”

I'm running single Magento 1.7 installation with 2 store views. I have two domains which are search engine optimized for Ireland and UK. Since content is very similar I would like to use rel="...