It's the first time for me that I implement a multi-language and regional website. I read all the google information about how to implement hreflang tags and I also read a few other information on the internet and now I am just not sure if what I implemented is "best practice".
So I have on top-level domain ".com" and for the beginning I decided to go with the sub-folder structure. Initially, I only had /de and /en. Nothing special. I then realized that for certain posts, pages etc. (it's basically an information platform) I'd like to specifically target a region.
So for instance I maybe have one post written in German for people speaking German (generic, so simple 'de)', I might like to change a few parts (and some affiliate links) to make it more suitable for Austria.
The page then will have hreflang flags "de" and "de-AT" with the respective unique links. There will be definitely a content overlap of > 70%.
Also, I want to keep the thing as flexible as possible. So it would be possible to target specific regions without targeting the general language that is spoken there. For instance, it should be possible to write a post only for people in Austria speaking German 'de-AT' and there is no translation for people that just speak German "de".
To make it very clear, the database would look like this (first table are posts and second are post_translations):
#id, author, created_at, updated_at '1', 'Snake', '2020-06-30 10:55:00', '2020-06-30 10:55:00' '2', 'Snake', '2020-06-30 11:45:53', '2020-06-30 11:45:53' '3', 'Snake', '2020-06-30 15:09:18', '2020-06-30 15:09:18' '4', 'Snake', '2020-06-30 15:09:18', '2020-06-30 15:09:18' '5', 'Snake', '2020-06-30 15:09:18', '2020-06-30 15:09:18' #id, post_id, locale, title, slug, content '1', '1', 'de', 'Title 1', 'title-1', 'Content 1' '2', '1', 'de-AT', 'Title 1 de-AT', 'title-1-de-at', 'Content 1 de-AT' '3', '2', 'de', 'Title 2', 'title-2', 'Content 2' '4', '3', 'de-CH', 'Title 3 de-CH', 'title-3-de-ch', 'Content 3 de-CH' '5', '4', 'de', 'Title 4', 'title-4', 'Content 4' '6', '5', 'de-AT', 'Title 5 de-AT', 'title-5-de-at', 'Content 5 de-AT'
So the Post 1 that targets German speakers and German speakers in Austria, written by Snake, would have two associated posts, with these hreflangs:
<link rel="alternate" hreflang="de" href="/de/title-1"/> <link rel="alternate" hreflang="de-AT" href="'/de-AT/title-1-de-at"/>
and post 5 would only have on hreflang flag and targets only de-AT (much more specific), the hreflang flag would be then
<link rel="alternate" hreflang="de-AT" href="'title-5-de-at"/>
I think (or hope) that this approach is what I want, to be able to have generic posts written for English and German speakers, but I also want to be able to target very specific regions.
What now gives me a very hard time is the following. Let's say I have someone coming to my website on page domain.com/blog/de. That means he would be on the generic page for German speakers. Same would be true if we had /en. As you can see from my example there would be pages for German speakers but also for German speakers in Austria. My idea is now, that on the /de site I show all posts that are available in German, irrespective of the region, so the index would look like (the numbers are the respective ids in post_translations table):
(id) 1 Title 1 de 2 Title 2 de 3 Title 3 de-CH de-CH 4 Title 4 de 5 Title 5 de-AT de-AT
...but if I have someone coming to my 'de-AT' blog index page, I'd only show him the following index:
1 Title 1 de-AT de-AT 5 Title 5 de-AT de-AT
So my final question now would be, does that make sense? Or should I only show on the generic site 'de' the posts that are written in German, irrespective that other people from Austria and also Switzerland could read it. The same would be true for English of course, posts that are for people in the US ('en-US') could be also read by people from the UK obviously, so it could make sense to present these posts to people from UK as well).
If I'd go with a "strict" version, staying with my example, the index for 'de' would the exclude the post with Title 5 ('de-AT') and Title 3 ('de-CH') and would look like this:
1 Title 1 de 2 Title 2 de 4 Title 4 de
I believe it would then also make sense to include some logic to make sure that an user that is located in Austria would get hints that certain posts are available in his language or to maybe inform him that he is currently on the generic index page and maybe he wants to go for the specific index page for his region, but that's a different story.