13 October 2021

hreflang

In the Blogger template after (the default) 'all-head-content' line one can add hreflang attributes.

    <b:if cond='data:blog.url == &quot;https://********.blogspot.com/p/example.html&quot;'>
        <link href='https://********.blogspot.com/p/example.html' hreflang='en' rel='alternate'/>
        <link href='https://********.blogspot.com/p/eksempel.html' hreflang='da' rel='alternate'/>
        <link href='https://nurmi-labs.blogspot.com/p/example.html' hreflang='x-default' rel='alternate'/>
    </b:if>
    <b:if cond='data:blog.url == &quot;https://********.blogspot.com/p/eksempel.html&quot;'>
        <link href='https://********.blogspot.com/p/eksempel.html' hreflang='da' rel='alternate'/>
        <link href='https://********.blogspot.com/p/example.html' hreflang='en' rel='alternate'/>
        <link href='https://********.blogspot.com/p/eksempel.html' hreflang='x-default' rel='alternate'/>
    </b:if>

In the robots.txt file's add a second line for a Sitemap with the value https://********.blogspot.com/sitemap-pages.xml.