2022 Developer Survey is open! Take survey.

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
0 votes
1 answer
24 views

Magento 2 : How to get hreflang from address url?

When i have the address: <link rel = "alternate" hreflang = "de" href = "..." />. I would like to take the hreflang value from this address, meaning "de"....
user avatar
  • 3
0 votes
1 answer
36 views

Creating a register link inside of ko text

Fairly easy question for most but it's somewhat tricky and I'm having issues. <span class="note" data-bind="fadeVisible: isPasswordVisible() == false"><!-- ko ...
user avatar
1 vote
0 answers
71 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 ...
user avatar
3 votes
3 answers
2k 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 : $...
user avatar
  • 188
1 vote
1 answer
621 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?
user avatar
1 vote
2 answers
661 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 ...
user avatar
  • 11
6 votes
2 answers
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 ...
user avatar
1 vote
1 answer
52 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/...
user avatar
  • 403
0 votes
1 answer
391 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. <?...
user avatar
0 votes
1 answer
958 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')->...
user avatar
  • 53
0 votes
1 answer
164 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 ...
user avatar
1 vote
2 answers
703 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 / ...
user avatar
  • 295
2 votes
3 answers
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) { ...
user avatar
1 vote
1 answer
60 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()-&...
user avatar
  • 21
2 votes
1 answer
764 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()-&...
user avatar
3 votes
5 answers
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 ...
user avatar
  • 3,582
2 votes
1 answer
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 ...
user avatar
2 votes
1 answer
809 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....
user avatar
5 votes
8 answers
14k 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 (...
user avatar
  • 353
1 vote
3 answers
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="...
user avatar