x

How to add the hreflang-Tag for Google?

Good morning community!

After choosing the target country for my website I´m told at Google-Wemaster-Tools, that Google did not handle the "hreflang-Tag".

Is any possibility in Weebly, to add the hreflang-Tag for Google, or will Google recognize that by itself some times later?

Thanks! Smiley Happy

Tags (2)
11,210 Views
Message 1 of 7
Report
1 Best Answer

Best Answer

Hi, there!

You can add additional tags to your site by going to "Settings" > "SEO" > Header Code. You would place your code in the "Header Code" section of the SEO page in Settings.

If you still have trouble with this tag after a few weeks, please let us know.

Thanks,

Erin

Weebly Community Manager

View Best Answer >

11,150 Views
Message 2 of 7
Report
6 REPLIES 6

Best Answer

Hi, there!

You can add additional tags to your site by going to "Settings" > "SEO" > Header Code. You would place your code in the "Header Code" section of the SEO page in Settings.

If you still have trouble with this tag after a few weeks, please let us know.

Thanks,

Erin

Weebly Community Manager

11,151 Views
Message 2 of 7
Report

Thank you very much for replying, @Erin; only one additional question more:

Where to put the Tag exactly - before, or behind the Google-Analytic-Script?

At the moment it would look like that:

<link rel="alternate" hreflang="de-at" href="http://s-schnitzl.weebly.com/" />


<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-82833599-1', 'auto');
ga('send', 'pageview');

</script>

10,883 Views
Message 2 of 7
Report
Square

That should work just fine in that order, @sSchnitzl-Sbg.

10,846 Views
Message 2 of 7
Report

Very helpful post!

Here are the tags added to my English language only site based on additional online research.

<link rel="canonical" href="http://www.natemcclain.com/">
<link rel="alternate" href="http://www.natemcclain.com" hreflang="en-us" />
<link rel="alternate" href="http://www.natemcclain.com" hreflang="x-default" />

10,710 Views
Message 2 of 7
Report

THANK YOU ! YOUR FIX WORKED FOR ME Smiley Happy
6,255 Views
Message 2 of 7
Report

how to put hreflang tag,i added in setting seo header section <link rel="alternate" href="http://example.com/en" hreflang="en" /> this code for english.but it cant work.should i wait? how much?

4,998 Views
Message 2 of 7
Report