Reputation: 21
I am recently having an increased number of "hreflang no return tags" error on the Google webmaster console and I cannot figure out what I am missing. My site is www.example.com and it can be accessed in different languages as www.example.com/#!/xx, where xx is one of the following options: it, ro, ru, pt, en, es, fr.
My code snippet looks like:
<link view-head rel="alternate" hreflang="x-default" href="{{domain_absolute}}#!/{{mainVars.currentLanguage}}/--about-us" />
<link view-head rel="alternate" hreflang="es" href="{{domain_absolute}}#!/es/--about-us" />
<link view-head rel="alternate" hreflang="pt" href="{{domain_absolute}}#!/pt/--about-us" />
<link view-head rel="alternate" hreflang="ro" href="{{domain_absolute}}#!/ro/--about-us" />
<link view-head rel="alternate" hreflang="ru" href="{{domain_absolute}}#!/ru/--about-us" />
<link view-head rel="alternate" hreflang="en" href="{{domain_absolute}}#!/en/--about-us" />
<link view-head rel="alternate" hreflang="it" href="{{domain_absolute}}#!/it/--about-us" />
<link view-head rel="alternate" hreflang="fr" href="{{domain_absolute}}#!/fr/--about-us" />
And the errors I get from Google are the following:
Original URL : #!/en/some-document
Alternate URLs: http://www.example.com/?_escaped_fragment_=/en and http://www.example.com/?_escaped_fragment_=/en/some-document - no return tags
I get the same errors for all of the supported languages.
What am I doing wrong?
Upvotes: 0
Views: 1225
Reputation: 1
While deprecated, Google is understanding the #! and converting the URL to the escaped fragment version. Since Google is telling you they cannot find the return on the /?_escaped_fragment_ version of the URL this is telling me that your rewrite of the URL to respond to their request is missing the HREFLang Element.
View the source on http://www.example.com/?_escaped_fragment_=/en/some-document and if you don't see the HREFLang string you show in the screen capture that is your problem. Ensure you have it on both versions and YES you should cover it to include the escaped fragment version of the URL and that error will go away.
The alternative I use for sites with more than 5 country/language combinations is to use XML site maps and submit the excepted fragment version.
Upvotes: 0
Reputation: 1058
# is a special character. Everything in a URL after the # is ignored.
#! is a special case. If you use #! then Google treats it as a signal to convert it to a different URL for AJAX crawling. This "feature" is deprecated. And your URL structure tells me you are not using #! in this way anyway.
So bottomline: change your URLs so that you are not using #. Give all languages their own URL.
Upvotes: 0