Custom hreflang tags in WP & using with Yoast
-
Hi
My clients dev has added custom fields for adding hreflang tags to head of pages such as:
"Rel Type", "The URL", and "Language Code"
Am i right in thinking that until a different language/country version of the site is created these can remain empty or should they still be populated once added say with some sort of global reference or best left blank since will leave the head content global by default ?
Also how important is it to add charset to the language code ? since seems optional ?
Also this set up is on WP multi-site with Yoast and devs asked me the below:
_One thing to note is that Yoast generates its own "canonical" tags - so if _
_you are going to use hreflang tags and canonical tags then you don't need to _
_add a canonical using the custom fields I have set up - Yoast has that _
sorted._But if you are going down the route of NOT having any canonical tags - and _
_using a x-defult for the hreflang tags, I will need to try and suppress the _
_Yoast canonical tag so you can do this. Much depends on your approach and _
what you think is best.So how do i know if using canonicals or x-default, i take it best simplest to leverage Yoast and hence not add canonicals to custom fields ? Isnt x-default just for indicating language selectors/redirector not specific to 1 region? So long as havnt got those then good to proceed with Yoasts generated canonicals ?
Cheers
dan
-
Hello,
I have a Blog In Which I am Using Google Translate, Which Can Convert the Blog into Multilanguages. Is it Suggested to use Herflang Tags in My Blog. Thanks In Advance ( Blog I Have Mention is signature)
Ashish Sharma
-
Thanks again really is a big help
Ive read that correct charsets are important, i take it that plugin handles that correctly ?
Do you know if plugin should work fine in WP Multisite environment with network childs domain mapped with their cctlds ?
Re: "using x-default and removing the canonical is nonsense" The dev just meant if going down route of NOT using canonicals AND using x-default in the hreflang then would need to suppress Yoast in those instances.
Re: "In my example, I used two very similar (if not the same langs), however there are things that change, but those are minimal (take as an example a car "hood", in England a "bonnet"). As those are such minimal changes, I don't think a specific version for GB is needed if you are already serving a US version (that's up to you)." Would you say the same if phrases containing these regional variations (hood vs bonnet) were on your target kw list ? Since i find that whilst Google is getting better at semantic relationships between words i think that they do need to be specifically targeted/appear in content & meta data in order to rank for them, or at least increase chances of ranking for them.
Also re your final paragraph 'car repair centers' would be a logical target kw for such a page so i would have thought it would be beneficial to create 2 versions of this page, 1 for US targeting US spelling & 1 for UK targeting UK spelling (centers vs centres), rather than 1x English to serve both UK & US audiences
Also I would have thought it would be useless showing a list of US car repair centers to UK visitors ?
Sorry for more questions, think that should be it now & thanks again
All Best
Dan
-
Dan,
If you have an English page that is also available on Turkish (same content but rewritten/translated) then an hreflang tag is recommended, not mandatory, but recommended. Although as you said you are already writing in Turkish and geotargeting in GWT, there are other engines too, that regardless their market share, shouldn't be overlooked.
HOWEVER, if you have a page in English not matching a Turkish page, then you don't need the hreflang in that page. The tag is only used when the same content is available on other language/location to tell engines which version they should serve.
What you mention about using x-default and removing the canonical is nonsense. Those are 2 different things and one would not interfere with the other. The plugin I recommended does not mess with Yoast, leaving the canonicals as they should be and adding the hrefland tags as specifies. Check this example on my site English and Spanish using both Yoast and the hreflang Manager plugin:
- English: http://viberagency.com/blog/6-reasons-shouldnt-put-intern-charge-companys-social-media/
- Spanish: http://es.viberagency.com/blog/6-razones-por-las-que-debes-dejar-un-pasante-cargo-de-los-medios-sociales-de-tu-empresa/
Check the source code, both have their canonicals and hreflang tags just fine. We chose to use the English version as the default, as you can see in the x-default.
The hreflang tags should be used only when the content is the same (but targeted to a different audience). Of course of the translation from one language to the other some lines must be rewritten to make sense.
In my example, I used two very similar (if not the same langs), however there are things that change, but those are minimal (take as an example a car "hood", in England a "bonnet"). As those are such minimal changes, I don't think a specific version for GB is needed if you are already serving a US version (that's up to you). In that case (1 english version to all english speakers), you only specify the language, instead of the Language and Region:
<link rel="<a class="attribute-value">alternate</a>" href="http://www.example.com" hreflang="<a class="attribute-value">en</a>"/>
Now, just to make sure we have an example that DOES apply a different GEO in en-US and en-GB, could be a page that explains what are car repair centers, plus below it shows a list of repair centers. In these scenario, the content is the same, but the list of repair centers change, you would like to display those in GB to your GB audience (still, from my point of view, useless, but was just an example).
Hope that clears it up
-
Hi Apog
Thanks so much for all that great info !
First of all, the main default site is for general/global targeting so have instructed dev to put on network.domain.com/en (but mapped to tld domain.com) to signify english but not be country specific - global kw research has determined USA spelling to be used predominently with just one or two UK spelt target kw).
The next stage is a Turkish geotargeted site that will be in Turkish language on our WP MS network network.domain.com/tr but mapped with a tld such as www.domain.tr which will be geotargeted in GWT. Given these other geo signals such as gwt, native language in body copy etc is hreflang even needed for such a scenario or due to hreflang is overkill/not needed ?
Re your example (US/GB): You are saying use x-default but my dev says (copied in my question) that if we want to use x-default then would have to suppress Yoast re the canonical, so any ideas how to resolve that ? Does the plugin you linked to handle hreflang without requiring Yoast to be suppressed re having x-default or not applicable since only refers to scenario where not having canonicals.
Also you say your example set up is if the contents not exactly the same, do you mean if they have substantially different content ? And your second point (below the example set up) says if they have the same content - so here do you mean if the only difference is US/vsGB versions of english language/spelling but otherwise identical ? And if our target kw include the USvsGB spelling variations then i take it the en-gb version isnt expendable after all ?
Thanks for all your help and sorry for more questions but i really need to get to the bottom of this asap
Many Thanks
Dan
-
thanks Kristina !
-
Hey Dan,
If I understood correctly, you should use both. Canonical tags are used tell search engines that the content is located on the canonical content, while hreflang points which version should be served to each visitor depending on the user's location/language.
If you Yoast, then they already handle the canonical tags and there's nothing you need to do. For the hreflang, if you have at the moment only 1 version served to all visitors, then those shouldn't be used. However, if you have 2 versions quite similar, like en-US and en-GB then you will need to choose the one that's default, let's say the US version and have the following on each version:
en-US:
- Canonical pointing to it.
- Hreflang x-default pointing to it
- Hreflang en-US pointing to it
- Hreflang en-GB pointing to en-GB version
en-GB:
- Canonical pointing to it.
- Hreflang x-default pointing to en-US
- Hreflang en-US pointing to en-US
- Hreflang en-GB pointing to it
This applies if the en-US and en-GB versions are NOT exactly the same. If the language changes (that's why you create a specific version to each country) you need a canonical in each version pointing to itself.
If the en-US and en-GB have the same contents, then the canonical should point to the en-US version (but there's no need to have the en-GB version really, which makes it useless / expendable).
As you mention that at the moment you do not have any extra langs/regions, then you could leave the tags empty or better remove them.
There's a plugin for wordpress that handles hreflang tags (paid) hreflang Manager
Hope that helps!
-
No need to worry about hreflang (and therefore x-default) unless you're working with international versions of your sites! If Google doesn't see anything referencing international, it will figure out the language and country from the ccTLD and the language you're using on your site. Hreflang tells Google where the international versions of a page are, it isn't necessary to designate a language and location.
Best,
Kristina
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Duplicate title while setting canonical tag.
Hi Moz Fan, My websites - https://finance.rabbit.co.th/ has run financial service, So our main keywords is about "Insurance" in Thai, But today I have an issues regarding to carnonical tag. We have a link that containing by https://finance.rabbit.co.th/car-insurance?showForm=1&brand_id=9&model_id=18&car_submodel_id=30&ci_source_id=rabbit.co.th&car_year=2014 and setting canonical to this url - https://finance.rabbit.co.th/car-insurance within 5,000 items. But in this case I have an warning by site audit tools as Duplicate Page Title (Canonical), So is that possible to drop our ranking. What should we do, setting No-Index, No-Follow for all URL that begin with ? or keep them like that.
Technical SEO | | ASKHANUMANTHAILAND0 -
Localizing URLs Path - Hreflang
Hello, This is a simple question regarding how URLs should be managed for proper results with the hreflang tags. Right now, we have a website in English and German. The hreflang tag is working properly. This is how we currently have it: https://www.memoq.com/ https://de.memoq.com/ But we will soon change the way we localize our web, moving out of the sub-domain structure. There is this possibility of localizing the URLs path, but I was wondering if the hreflang tag would work in such case. The new structure would look something like: https://www.memoq.com/why-memoq https://www.memoq.com/de/warum-memoQ So my question is: If we localize the keyword in the path of the URL, will the tag still work? Or do they need to be in the same language than the English version. Thanks!
Technical SEO | | Kilgray1 -
Using images from one domain on another?
I run a travel photography business where I sell fine art prints. I've been toying with the idea of creating a few new websites about some of the places I've traveled to. This is for a few reasons. First, because I love talking about my travels. But second, because I feel like it might be a good way to bring in more print sales from those places. The question I have, if I were to use the images from my main photography sales domain on a different domain, how does this affect SEO? These images filenames for the photographs are already optimized well for searching. Thanks!
Technical SEO | | shannmg10 -
Should Canonical be used if your site does not have any duplicate
Should canonical be used site wide even if my site is solid no duplicate content is generated. please explain your answer
Technical SEO | | ciznerguy0 -
Why does it take so long for my TITLE tag it show ??
Hi Guys, I am frustrated here! I have changed my title tag so that I get a much better CTR. But I changed it a week ago and it is still howing the old title tag in the SERPS. Can anyone please tell me how long Google can take to show the new title tag in the search results?? Can it take weeks?? Thanks guys Gareth
Technical SEO | | GAZ090 -
Duplicate title tag error
Hi all, I am new to SEO, and we have just launched a new version of our site (kept the domain name the same though). I keep getting errors for duplicate title tags - e.g. www.sandafayre.com/default.aspx and www.sandafayre.com/Default.aspx, www.sandafayre.com/StampAuctions.aspx and www.sandafayre.com/stampauctions.aspx (plus loads others :o). The only difference each time seems to be the capitalisation of the first character - but I though URLs were not case sensitive? I've been advised to add the rel canonical tag to one of the pages, but the problem is I really only have 1 version of each page! Can anybody help please? Many thanks in advance! Nikki
Technical SEO | | Stampy780 -
Hreflang on non-canonical pages
Hi! I've been trying to figure out what is the best way to solve this dilemma with duplicate content and multiple languages across domains. 1 product info page 2 same product but GREEN
Technical SEO | | LarsEriksson
3 same product but RED
4 same product but YELLOW **Question: ** Since pages 2,3,4 just varies slightly I use the canonical tag to indicate they are duplicates of page 1. Now I also want to indicate there are other language versions with the_ rel="alternate" hreflang="x" _element. Should I place the _rel="alternate" hreflang="x" _on the canonical page only pointing to the canonical page with "x" language. Should I place the _rel="alternate" hreflang="x" _on all pages pointing to the canonical page with the "x" language? Should I place the _rel="alternate" hreflang="x" _on all pages and then point it to the translated page (even if it is not a canonical page) ? /Lars0 -
Title tag same text as H1?
What is the group's opinion on whether or not the <title>tag should have the exact same text as the <h1> tag on the same page? Obviously both should contain the phrase that page is optimized for but is it better to have them be variants of each other, or both the same and maybe equal to the key phrase that page is optimized for? Thanks.</p> <p>Example:</p> <blockquote style="background: none repeat scroll 0% 0% #f7f7f7; padding-top: 5px; margin-left: 0px; padding-left: 2px; padding-bottom: 5px; white-space: nowrap; overflow-y: auto; font-family: monospace;"> <p>title: los angeles blue widgets</p> <p>h1: los angeles blue widgets</p> </blockquote> <p>Or,</p> <blockquote style="background: none repeat scroll 0% 0% #f7f7f7; padding-top: 5px; margin-left: 0px; padding-left: 2px; padding-bottom: 5px; white-space: nowrap; overflow-y: auto; font-family: monospace;"> <p>title: los angeles blue widgets</p> <p>h1: blue widgets in los angeles</p> </blockquote> <p>Where the page is trying to optimize for "los angeles blue widgets"</p></title>
Technical SEO | | scanlin0