Join the Webstudio community

Updated 2 weeks ago

How can I embed custom HTML within my head tags?

I'm looking for a way to embed custom HTML within the head tags of my pages. I need to be able to set country specific alternatives to my canonical pages.

Example:

<link rel="canonical" href="https://www.website.com/">
<link rel="alternate" href="https://www.website.com/" hreflang="en-US">
<link rel="alternate" href="https://www.website.com/" hreflang="en-GB">
etc...
O
A
j
11 comments
Peeople have been asking this a lot lately, is the reason the fear that google will dowgrade the rating for duplicate content between different languages on the same page?
Or is that literally helping with getting the result in the right language?
This approach provides clarity to google and other search engines as to which page to serve users searching from different geos. This way the appropriate page will show in the results pages that caters to the user from that geo. But yes setting the canonical reduces the risk of duplicate content penalties particularly where the pages are in the same language but cater to users from a different country (ie GB, CA, US, AU, NZ).
I was always thinking goog knows the language anyways from the query, but probably when query is a name that is universal in many languages then this would help
they do this provides a signal however and is not a directive. it just helps because even google can mess up
The other option of dealing with this is to incorporate hreflang within an XML sitemap where each URL is provided with alternatives if they exist.
it might be the more efficient way of dealing with it especially if the site has a lot of pages
i just had the same question. the hreflang link tags together with the sitemap are defintly best practices to tell Google that there are language alternatives of the page: https://developers.google.com/search/docs/specialty/international/localized-versions

In past projects where the goal was to improve seo of localized sites this did drastically improve the speed pages were indexed and ranked. as it is super easy for Google to crawl the pages quickly.

@Oleg Isonen is this somehow planed to implement?
We started looking into it today
@Oleg Isonen your solution with the head solt is ingenius! love the fast implementation!
Its the team, not me)
Add a reply
Sign up and join the conversation on Discord