Page MenuHomePhabricator

Create redirect from tj.*.org to tg.*.org
Closed, ResolvedPublic

Description

Users often confuse the country code tj (Tajikistan) with the correct language code tg (Tajik). To improve usability and reduce confusion, please consider adding a redirect from tj.*.org to tg.*.org.

There is existing precedent for such redirects:

jp.*.org → ja.*.org (Japan → Japanese)

dk.*.org → da.*.org (Denmark → Danish)

cz.*.org → cs.*.org (Czech Republic → Czech)

Adding tj → tg would be consistent with these and help users reach the correct language domain more reliably.

Event Timeline

Pppery renamed this task from Site requests to Create redirect from tj.*.org to tg.*.org.May 9 2025, 5:15 PM
Pppery removed Amire80 as the assignee of this task.
Pppery added a project: Domains.
Pppery added a subscriber: Amire80.
Pppery subscribed.

Note for the record that tj is not a valid language code, so there isn't (currently) any conflict with a hypothetical tj-language wiki

I support this. For just a bit more context, @zolfeqar brought it up in a conversation with me at the Central Asian WikiCon in Tashkent, and I suggested that he create this task.

Added serviceops because this would have to be added in Apache/appserver redirects (as opposed to redirecting entire domains in ncredir service, which would be traffic).

(modules/mediawiki/files/apache/sites/redirects/redirects.dat vs. modules/ncredir/files/nc_redirects.dat. The existing redirects mentioned here, like "jp -> ja" are in the former.)

Change #1148981 had a related patch set uploaded (by Dzahn; author: Dzahn):

[operations/puppet@production] mediawiki/apache: redirect tj.*.org to tg.*.org for all projects

https://gerrit.wikimedia.org/r/1148981

I just chatted with @jasmine_, who is interested in helping to deploy this change. Many thanks for preparing a patch, @Dzahn!

Ah, I realized when cross-checking https://gerrit.wikimedia.org/r/1148981 against DNS that the tj records have not been added yet there.

For this to work as expected, we'll also need to add tj to the list in [0] in order to create the necessary per-project CNAME records.

This of course can (and indeed should), happen after configuring the redirects.

[0] https://gerrit.wikimedia.org/r/plugins/gitiles/operations/dns/+/refs/heads/master/templates/helpers/langlist.tmpl

Change #1152136 had a related patch set uploaded (by Jasmine; author: Jasmine):

[operations/dns@master] Add tj to langlist helper

https://gerrit.wikimedia.org/r/1152136

Change #1148981 merged by Jasmine:

[operations/puppet@production] mediawiki/apache: redirect tj.*.org to tg.*.org for all projects

https://gerrit.wikimedia.org/r/1148981

Mentioned in SAL (#wikimedia-operations) [2025-06-12T17:35:25Z] <jasmine@deploy1003> Started scap sync-world: Deploying apache2 configuration change for T393803

Mentioned in SAL (#wikimedia-operations) [2025-06-12T17:36:20Z] <jasmine@deploy1003> jasmine: Deploying apache2 configuration change for T393803 synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2025-06-12T17:50:44Z] <jasmine@deploy1003> Finished scap sync-world: Deploying apache2 configuration change for T393803 (duration: 20m 58s)

Change #1152136 merged by Jasmine:

[operations/dns@master] Add tj to langlist helper

https://gerrit.wikimedia.org/r/1152136

works for me now. thanks @jasmine_ for deploying my patches!:)

 curl -vv https://tj.wikipedia.org
..
<p>The document has moved <a href="https://tg.wikipedia.org/">here</a>.</p>

curl -vv https://tj.wiktionary.org
..
<p>The document has moved <a href="https://tg.wiktionary.org/">here</a>.</p>

@zolfeqar feel free to verify it works as desired

Dzahn claimed this task.

Thanks to @jasmine_ for helping with the deployment.